Is there anyway to make an object rotate on the x axis freely without any coding? I am also trying to make it rotate to which way the mouse is.
Can you explain a little bit better?
All objects can rotate on the x axis freely.
Basically Im making a tank game, and I want it to move where the mouse is pointed. And by “axis” I mean like a car axis. It can rotate one direction with gravity.
You mean an axle? Best way to go about an axle is to use a vehicle wrapper. I believe Monster has one, but I’m having trouble finding one later than Blender 2.49. If he’d like to pitch in I’m sure he can find it for you.
i can only think of something with like very little coding:
you would have the upper part of the tank (the lower part rotates with a/d right?) track (not 3d) to an empty, lets just call it “trackempty”
always ----- and ----- track to “trackempty”
in the trackempty you would have a mouse over any sensor with true level triggering connected to a python script controller
script would be
import bge cont = bge.logic.getCurrentController() mouseover = cont.sensors["mouseover"] #this should be the mouse over any name trackempty = cont.owner trackempty.position = mouseover.hitPosition #this moves the trackempty to the mouse hit position --> turns the upper part of the tank
if you want the upper part of the tank to track slower, just adjust the tracking time
for this the upper and lower part would have to be different objects, with the upper part being parented to the lower part