camera turing problem

Blitz3D Forums/Blitz3D Beginners Area/camera turing problem

Braden(Posted 2008) [#1]
ok,

this is hard to explain... here is the code




ok, with the game controller buttons I turn down, then I turn left or right, and then, the screen is all crazy and on its side... can anyone please help... this has been bugging me for hours!!!


KillerX(Posted 2008) [#2]
It's because you're turning in multiple directions. Use a pivot to turn left and right,and move the camera up and down. That should work. Also please use code or codebox tags in the future
;insert code here





Braden(Posted 2008) [#3]
how would I use a pivot to move left and right?


KillerX(Posted 2008) [#4]
If keyhit(203) turnentity campivot,0,1,0
If keyhit(200) turnentity camera,1,0,0



Ross C(Posted 2008) [#5]
I just wouldn't use turnentity if you can help it :o) Try using rotateentity.


Ross C(Posted 2008) [#6]
Function Turn_Entity(entity, x#, y#, z#, coordsys=False)

  RotateEntity Entity, EntityPitch(entity,coordsys)+x, EntityYaw(entity,coordsys)+y, EntityRoll(entity,coordsys)+z, coordsys

End Function


That way you don't need to use a pivot.

The thread on this:

http://www.blitzbasic.com/Community/posts.php?topic=81169