How do I constrain an object’s axis to a curve in the game engine?
If I am not badly mistaken, curves don’t work in game engine.
Hmm… I don’t think you can do that exactly, but you can fake it by using an IPO. If you only want to constrain one axis, then make sure that it is the only axis in the IPO (delete all the other channels). If you have a curve already and you want to convert it to an IPO, you can use a script by haramanai in this thread: http://blenderartists.org/forum/showthread.php?t=83942
You will need to set up some sort of system to keep the object on the converted curve (probably with an Always sensor and an IPO actuator set to Property, then you can move it around on the curve by changing the value of Property).
how do you work that script:o
F1 = Fram Start
F2 = frame End
make sure the code is well write
(the next line after the “for i in range (f1, F2)”
get one tabulation before text (for each 3 lines)
and then, select your objct which follow the path
and make alt + p in the text windows (where you’ve got the scrit)
thanks for the help