turning camera with pivots

Blitz3D Forums/Blitz3D Beginners Area/turning camera with pivots

Braden(Posted 2008) [#1]
how do I turn my camera with pivots(left & right)? what are pivots? how do you use them?


GfK(Posted 2008) [#2]
A pivot is a type of entity with no surfaces/vertices/polys attached. Think of it as just an axis/handle/pivot point.

Example showing a camera attached to a pivot. Moving the pivot, also moves the camera.

(Hopefully this'll work - haven't touched Blitz3D in years)

Graphics3d 800,600
cam = CreateCamera()
pivot = CreatePivot()
sphere = CreateSphere()
MoveEntity sphere,0,0,25
EntityParent camera,pivot
While Not KeyDown(1)
  TurnEntity pivot,0,1,0
  RenderWorld()
  Flip
Wend



Braden(Posted 2008) [#3]
ok, so how would I use this to turn my camera when it is looking down and not have it flip over? I had another topic like this called
Camera Turning problem


Stevie G(Posted 2008) [#4]

ok, so how would I use this to turn my camera when it is looking down and not have it flip over?



Apply the pitch changes to the camera and the yaw changes to the pivot.