Hi, I’m working on my first game, a small maze-puzzle game but I’m having a heck of a time getting my camera to work right and how to set up my controls in the most efficient way.
I’ve searched elysiun a bunch of times and read every camera follow tutorial I could find and I also have the gamekit book, which I have looked through, but nothing really addresses my exact problem, so I thought I’d post it up here and hope someone can help!
My problem is, I have a rolling ball that you control with the arrow keys (globally) and I want a camera to follow it. If you’ve ever played Metroid Prime on GameCube, and you enter Morph Ball mode, I want to control my ball EXACTLY like that. The camera follows behind the ball, staying parallel to the ground no matter which direction the ball is facing. Also, the controls in Metroid seem to be based on the direction the camera is facing, not the ball.
I’ve tried parenting the camera to the ball, and it spins wildly with the ball’s local coords. I’ve tried the camera actuator, which is close, but the camera bounces around as it tries to stay behind the selected axis.
Here’s a screenshot of the scene (just 3D view), the coloroed boxes around the ball illustrate (in-game) where the local coords are pointing as the ball rolls.
When the controls are set to global coords, they work fine if the camera isn’t moving, once it is, you get disoriented with what direction is X,Y or Z. Setting them to local, well, that’s useless since the ball’s local coords change as the ball rolls around. Is there any way to set the controls to the direction the camera is facing, while having the camera follow the ball (turning around corners as the ball turns) the way I want (metroid-style)?
I’ve read alot about the GE but I haven’t seen any examples of anyone trying to build the same setup I have here. I’ve posted the .blend below if it helps.
BallMaze .blend
thanks, I hope someone can help figure this out so I can move on to building the rest of the game!!
-Gendo