Easiest way to position something in front of camera?

Blitz3D Forums/Blitz3D Programming/Easiest way to position something in front of camera?

Who was John Galt?(Posted 2003) [#1]
I want to position an entity a fixed distance in front of my (movable) camera. No problem positioning at camera coords, but what is the easiest way to move it a bit in front?


SSS(Posted 2003) [#2]
well i would do this
make the objects positition equel to the camera and then

objectX = objectX-Sin(EntityYaw(Camera))*Distance
objectY = objectY-Sin(EntityPitch(Camera))*Distance
objectZ = objectZ+Cos(EntityYaw(Camera))*Distance

you will have to play around with the Distance


Beaker(Posted 2003) [#3]
EntityParent ent,camera
PositionEntity 0,0,1
EntityParent ent,0


Cheers.


Who was John Galt?(Posted 2003) [#4]
Thanks very much, young man : )

<<Just been reading the off-topic stuff- I must get a life!!>>


Who was John Galt?(Posted 2003) [#5]
That reply was to SSS, didn't see your contrib, MB. I guessed there may be some tricksy B3D commandset way of doing it. Cheers.