Hi there. I’m trying to create a camera that can fly through a scene(in the air), using the arrow keys to move and the mouse to rotate the cam, and with Collision on the camera- so that it won’t go through objects.
I got the movement and rotation w/ the mouse to work, but I can’t figure out how to get it to fly through the air unaffected by gravity and not intersect objects.
(not the 3rd person type camera that pivots around an object, but basically the same cam as a fps game, but with ability to move through the air freely)
Is there a way to do this without having to turn off the scene’s gravity, parent the cam to a dynamic object and control it with servos? Probably by instead by using rays alone, like in the 3rd person cam type, or get it to stay in the air using servos with gravity turned on?
Thanks in advance for your help, I really appreciate it!
Hi there. I’m trying to create a camera that can fly through a scene(in the air), using the arrow keys to move and the mouse to rotate the cam, and with Collision on the camera- so that it won’t go through objects
Are you using 2.5x? If so you need to put it into game mode. You do this using the button up the top that is labeled “blender render” Click on that and change it to “blender game”
The Collision button only works for baked animations, ie non game engine stuff (particles, fabrics, etc)
I got the movement and rotation w/ the mouse to work, but I can’t figure out how to get it to fly through the air unaffected by gravity and not intersect objects.
When it is game mode, to get it to respond properly you have to make it a “dynamic” object. To make it dynamic (affected by gravity etc) you have to go to the physics tab and set it to dynamic. (Do you need more detail? It is in the very right-most tab of the properties window (2.56) or in the logic buttons tab (2.49))
Is there a way to do this without having to turn off the scene’s gravity, parent the cam to a dynamic object and control it with servos? Probably by instead by using rays alone, like in the 3rd person cam type, or get it to stay in the air using servos with gravity turned on?
Turning off the gravity is fine for having everything with 0 gravity, but if you just wan the one object you can add a simple motion sensor with force on the GLOBAL Z axis at 9.8
This means that for 9.8 newtons of force pulling it down (gravity) there are 9.8 newtons pushing it up. Because it’s a global force you won’t need to adjust it with the rotation of the camera.
Rays? You shouldn’t need anything to do with rays for this.
Do you need a demo file? If so then drop me a Private Message (PM) and I’ll make one for you.
Hey [B]sdfgsdfg[/B], thank you so much for taking the time to write such a thorough, clear and well organised reply! I appreciate you offering to take out of your time to make me a demo also!
The bit about applying an equal opposite force upwards on the object to cancel out the gravity is exactly what I needed!(totally slipped my mind) I’m using 2.49b btw.
I’m still curious about doing this with rays, because I usually prefer to not use physics wherever theres another method that can work, as I find alot of things are usually more solid without it, but this method looks like it works well.