I have a camera and parts of a vehicle parented to an empty, which is what is used to control the movement of my vehicle. I would like to be able to control the child camera with an IPO animation so that it turns to face the other way at the press of a key so the driver can see while backin up. I’d also like to have an optional mouselook if possible. Is this possible (so far my camera is not remembering the loc’d positions at all. >_<
make 2 cameras, place them where i want them, parent them to the empty, then use the set camera actuator in the.
Is there no way I could get smooth camera movement from front to back?
you would have a mess of python, and, it would probably be easier to do it to a point by using obj.setOrientation(…) and obj.setPosition(…) than using an IPO because you are trying to mess with more than one thing at a time.
so, are you willing to learn matrix multiplication, transforms, and python?
… I re-read your request and it doesn’t seem to well like it would work well because of how odd it is. Do you want the player to be able to turn the camera, and going backwards will overide that turning, or flip it around?
really, you need to choose one or the other
mouselook, or reversing on reverse
personally I would do mouselook with python and obj.setOrientation(…) (and I have for a racing game I don’t have good physics for). I may post the script if asked.
I have tried many methods, but I found the mouse look works best. Use a common mouse look, 360 degrees horizontal, 180 degrees verticle, then w,s,a,d or whatever for vehicle controls. this way you can just turn all the way around to look back. The only problem is you can lose your orientation to forward. To solve this you just use a image of your vehicle, say tank, on your heads up display. For the tank, which ever way I looked, the turret, on the heads up display,would point the same way. so it mad it easy to know where I was looking in conjuction with which way the vehicle was going. And also made it possible to shoot while vehicle was in motion.
What’s wrong with using an IPO on the camera? It should work fine if it’s the child of the dynamic empty.
Here, I made a quick example, it uses another mesh parented to the actor instead of a camera to make the animation easier to see. It should work the smae for a camera though.
Use the arrow keys to move and turn, press space to toggle the front/back animation.
Thanks a lot; I realize the mistake I was making… I was going IKEY, Loc and not IKEY, Rot. >_<
The demo was certainly helpful.
I see now how mouselook would sorta fight with my IPO animation… and I want my game to be able to clearly detect whether the driver is looking in the correct direction. This will be meant for miners, most of whom probably won’t be gamers, so perhaps leaving out the mouselook for simplicity’s sake would be best.
instead, what I will do I think, is have “beginner mode” with some sort of “keyboardlook” and an advanced mode with purely mouselook (no key to turn camera around).
Thanks for all the help… just don’t disappear on me, I’ll probably need more.