Camera question

Blitz3D Forums/Blitz3D Beginners Area/Camera question

Chad(Posted 2007) [#1]
I'm trying to create a rocking feeling while playing so keep that in mind.

With help off of IRC I have came up with the following code. Basically, it is WolRon's FPS example code with my

RotateEntity camera,Sin(MilliSecs()*.05)*.5,0,Sin(MilliSecs()*.05)*.5


However, with this I cannot use my mouse to look up and down, it stutters. And keeps it still. How can I use my Sin code but still have the full capabilities of my mouse look?




Fey(Posted 2007) [#2]
Just played around a bit, I don't really know if this will help much, but replacing the

RotateEntity camera,Sin(MilliSecs()*.05)*.5,0,Sin(MilliSecs()*.05)*.5

with

TurnEntity camera, Sin(MilliSecs()*.05)*.0075, 0, Sin(MilliSecs()*.05)*.0075

seems to give about the same rocking motion, while allowing the mouse look.


GfK(Posted 2007) [#3]
The easiest way is to create a pivot - the player controls the pivot via mouse.

Create a camera, parent it to the pivot. Apply your rocking code to the camera, not the pivot.


Chad(Posted 2007) [#4]
Thanks guys, Anony your suggestion worked great.