Home Technical Talk

Maya _ Rigging Mechanical Auto Aiming Turret for Game ??? HOW ???

polycounter lvl 8
Offline / Send Message
retmia polycounter lvl 8
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 !! :)


fGugm0T.png

Replies

  • .Wiki
    Offline / Send Message
    .Wiki polycounter lvl 8
    Its not maya but i gave it a quick try in xsi...

    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.

    p9m8vrzz.png
  • retmia
    Offline / Send Message
    retmia polycounter lvl 8
    Thank you for the Rig idea, but what I'm encountering is more a technical difficulty ... related to the software, Maya in that case :/ . Though I've had similar problems with 3DS Max in the past.
    I'm still searching, if anyone has anything ... ! :)
  • retmia
    Offline / Send Message
    retmia polycounter lvl 8
    Well I finally found, it was coming from the joints orientation. I didn't though that it could break things like that, and that we have to be extremely careful about it (X along the bones).
    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,

    9OvIftw.png
  • .Wiki
    Offline / Send Message
    .Wiki polycounter lvl 8
    Just a small tip, you dont need to use bones for those mechanical rigs. They will be converted to simple null objects anyway when you export them to unity so a simple setup with some nulls can save you a lot of trouble when doing rigs.
  • retmia
    Offline / Send Message
    retmia polycounter lvl 8
    Hum ! Thank you for the trick, it's good to know, we'll try this :)
Sign In or Register to comment.