Can you make something just not rotate on an axis in the GE?

Shouldn’t something like this be as easy as a few clicks??
I just want my camera to follow a rolling sphere without rotating on the Y or X axis. I also tried to make another object do the same thing, because I was thinking maybe you just can’t do that with a camera, but no, it seems it doesn’t work with another object either.
I’ve been searching the forums and the best thing I found was to put a vertex in the middle of the sphere and parent that to the camera, but that didn’t work right either. It almost did, because it didn’t rotate on the X and Y, but I still need it to follow on the Z so when I turn the sphere I know which way is straight(Z is up)…

well it depends on how the camera is following the sphere, if its parented then i cant help you…how ever, if you want to give it a shot, this might work, set the camera to “rigid body” the click on “advanced” and behold!!! you can select an axis to lock, wheather you want to lock the rotation or movment, hope this helps

It sounds like vertex parenting will fix it. If so you can select any vertex on the sphere and make that vertex the parent of the camera. You’ll find that the camera still tracks and follows the center of the sphere. Have you got the Outliner panel displayed? This makes it easier for a beginner to understand parenting.

try reading, he said that he tried it, but he wants it to follow the rotation on the z axis, but not rotate along the x and y axis

Hope this can help, it is a vertex parent but if not your camera would roll with the sphere up down and through the floor.

Attachments

follow.blend (301 KB)

I ran the file. The camera behaves itself but doesn’t follow in an interesting way. If you set the sphere shading to flat or run it in wire frame that you can see it’s facets and it rolls nicely but stays rock solid in the centre of the camera view. With a marble run game it’s nice if the camera lags a little as the marble accelerates, brakes and turns. It’s like the camera is following on a flexible spring and it gives a good look and feel. I’m guessing this is what you want.

Slow parenting (Properties > Animation Hacks) can give a nice smooth lag. Also figure out how you can steer your object, not by applying forces from the left and right but by turning the object around the world z-axis. In other words make the sphere roll like a wheel. You might have to introduce another dummy parent in there somewhere and parent your camera to that. The camera can swing with a nice smooth lag as you change direction.

Couple of tips. Select Extend in Render then you can see better what’s going on. Try moving you camera back and setting it’s lens angle to 65 or 70 degrees. Like wise with View angle.

Thank for the help, I never got it to do exactly what I wanted, but it was really just a test anyway. Figured out what I needed to.