So I'm trying to make a general purpose rig for a stabilized turret used on military vehicles using aim constraints. I've managed to get the rig to work whenever it's rotated along I believe the X axis but whenever I rotate it along the Z axis it starts get all wonky whenever it aims into the negative quadrants. I just want the rig to aim at a chosen point regardless of how the turret itself is oriented.
If you have a screen shot or diagram it might be easier to figure out what your issue is.
but from what you've described. you could try using an 'up vector' object to control the up axis of the aim constraint.
unless you are talking about when you cross the up vector when trying to aim
hth
-=s
Sorry it's kind of hard to explain exactly what's going on with words.
but whenever I rotate the gun along the Z axis and then aim to the rear it starts to do this, sorry it took so long to respond.
I am sure this happens when you limit the rotation axes in your aim constraint.
I can not tell you exactly why this happens but I can tell you how to set it up in a way that it works.
When you limit the rotation axis of your aim constraint, Maya gets confused when your target object´s position is not aligned with the aim vector.
For example, in this case, you want the base to aim at your target only by rotating in Y but your target is in a higher position because it needs to control the cannon orientation too.
To fix that, I assume that your object's local axis to aim is X and the local up Axis is Y.
I create a first target control at the base position, with a 0 value in Y and I will constraint the base, setting up X as the aim vector and Y as the up vector, by limiting the rotation to only Y.
Now your base should follow your control without flipping in the whole 360 range,
as long as you don't move your control up.
Now you create a second control for the cannon that Point constraints the first to only X and Z axes.
So that the base control does not go up.
now you aim constraint the cannon to the new target by using X as the aim vector and Z as the up vector.
(We put Z because the cannon is turning around Z and the up vector needs to be the one the object is rotating around to aim its aim vector)
Now the whole turret should behave as expected.
Hope this helped out
D
Can't find what you're looking for? Ask the community or share your knowledge.