Hey guys I hope you can help me with this or I may have to scrap this project AGAIN.
Here is the fileProject gemini.blend (531 KB)
The script is set to use module activation mode the part that is driving me crazy is def sprint(cont):
I have a character with legs that walk and strafe and a torso that swivels left to right up and down (courtesy of Jacob Merrill’s Video)
The movement is no concern. What is the concern is that I want the legs to snap to the rotation of the torso when you press right mouse and the torso to snap to the rotation of the legs when you press left shift. So far it is a disaster I tried
own.worldOrientation = own.children['playerBox_torso'].worldOrientation
Obviously it copies all the rotations and that won’t work because it causes the legs to rotate on the Y axis and I can’t have that ,so, all I want is the Z rotation. I tried
own.worldOrientation.to_euler().z = own.children['playerBox_torso'].worldOrientation.to_euler().z
but it seams to do NOTHING.
There is also the problem that when the rotation is copied the torso doesn’t stay in the direction of the legs but the first problem is more pressing.
I hope you guys can help if you need more info please ask I’ll be refreshing this page constantly.
Project gemini.blend (531 KB)