PDA

View Full Version : Turret help, IK or Lookat controller


HawkMan
10-26-2002, 05:20 PM
I'm working on a Turret for a rather large spaceship I have made.
and now I need to make it allways Target a dummy, so that I can easily animated it in animation and don't have to manually change the angles all the time...


Now the problem is. The turret is of course several parts. the Gunpart wich will rotate ont he X axis and the Turret or base part will rotate on the Z axis.

I've tried LookAt controllers.But you can't limit the LookAt controller to single Axis so that's out of the question...

And I've tried IK. I've made a 2 bone (+end bone) system, wich I've got to work reasonably well... except if I move the end bone the turret won't really look directly at it like I need. instead it seems to follow it's location with the end of the bon.. that's pretty badly explained but I can't really explain it better.

I've never really used bones before. so.

If anyone can explain to me how to set up the bones to work with this. Or give me some hints to a better way of doign it....

KiboOst
10-26-2002, 05:34 PM
Never did that, but you could contrain (look at) the gunpart to your dummy, then wire the z rotation of the turret to the z rotation of the gunpart (with euler controlers) ?

Hope helpfull

Kib

Stroker
10-26-2002, 06:13 PM
Guns have a Look At constraint (target). Base is linked to Guns with only z axis inherited.

Seems to work fine for me.
Just needs a little pivot work is all.

KiboOst
10-26-2002, 06:17 PM
Yeah, Strokker solution is simpler, go for it. one point, strokker :beer: Sometimes we forget the simple things...

Kib

HawkMan
10-26-2002, 09:58 PM
But how do you stop the "flip" that the LookAt controller do ?

since the Gun will be flipped if you move the target 9 degrees to the side. and with a turret gun thta's not a mirror copy on each side this looks kinda stupid :)

HawkMan
10-26-2002, 10:10 PM
hmm well I sort of fixed it.. as long as it doesn't aim to high..... :)

So is there some contrainst that stop it from rotatingmore than -20/+45 degrees without using IK's ?

/me goes digging into the controllers to see what he can find.

Stroker
10-27-2002, 01:57 AM
Here is another approach using IK.

Hierarchy:
Full Base > Extra Dummy > Barrels > Turret Base + End Dummy

(That means that Turret Base and End Dummy are children of Barrels.)

IK Chain01 goes from End Dummy to Extra Dummy.

After that, it's just a matter of locking down and constraing/limiting.

Once you start moving the blue cross thing outside of the limits, strange things might happen. I'm not sure about moving the blue cross thing more than 90 degrees over the top, though.

3rd Dimentia
10-27-2002, 03:44 PM
To stop the flip that the lookat controler does. Look into using upnodes. Use the ship as the upnode so you can flip the ship even upside down and still have the gun work properly without weird flipping.

CGTalk Moderation
01-13-2006, 08:01 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.