Hi there polycounters !
Once again I need your light ...
I'm building a turret prototype for a game in Unity. So I'm trying to rig it.
I haven't had time to export it to the engine that I already started to encounter rotation problems in maya :
After a certain angle, the joint driving the mesh, just flips around and doesn't follow the aim anymore ...
I know in some cases using Euler interpolation can repair curves, but I just want to create a functionnal rig ... I'm not using keyframes.
Unless the right way is to work with Set Driven Keys, but I don't think it's practical for an auto-aim system ...
Well well, I'm just lost, I haven't found tutorials about that, and I don't know how to approach the problem !!
Please Help !!
Replies
I did it with 2 seperate direction/look-at constraints. The constraint for the base of the turret follows a null which gets its x and z transforms from the "target" but always stays in 0 on y so the turret not rotates upward.
You will need to basic expressions to get the transforms of the x and z axis from the target object to the null.
The second constraint just rotates the barrel upward.
I'm still searching, if anyone has anything ... !
I turned on Local Rotation Axis to check my joints orientation and repaired it with a little plugin called CometJointOrient.
Now it works just fine, inside maya, Unity Engine integration will be another story !
Regards,