Easiest way to position something in front of camera?
Blitz3D Forums/Blitz3D Programming/Easiest way to position something in front of camera?
| ||
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? |
| ||
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 |
| ||
EntityParent ent,camera PositionEntity 0,0,1 EntityParent ent,0 Cheers. |
| ||
Thanks very much, young man : ) <<Just been reading the off-topic stuff- I must get a life!!>> |
| ||
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. |