Translating a 2D circle into a 3D enviroment

Blitz3D Forums/Blitz3D Programming/Translating a 2D circle into a 3D enviroment

MaximusPrimal(Posted 2008) [#1]
Hi,

I need to be able to caclucate a semi-circular path around an object so I can sling-shot an object around another.

I understand the use of cin/cos in a 2d world to create to create a circular or eliptical path. But how would I translate into a 3D world?

I need to be able to do it so that whatever angle & direction you approach the item from you always slingshot around it and come out in the direction you came from (i.e approach from the top, slingshot and come out the bottom heading back in the same direction).

I am guessing you would work out the angle of approach (which I think I can do) and then caluate a slingshot path with cos/sin and then somehow rotate that path to suit.

Any ideas or thoughts on how best to do this? I have tried to use pivots before but that didn't seem to work as I couldn't unparent my object, reparent it to the object to be slingshot'ed around and then reparent to the original pivot (which was also supposed to be slung around at the same time).

Many thanks.

MAx


Stevie G(Posted 2008) [#2]
This is a repost ... see beginners area for my response.