PDA

View Full Version : Projectile from a moving gun


rebo
08-31-2004, 11:16 AM
Stuck on quite a trivial thing but brains gone dead. Anyway, have a moving key framed gun, and need to animate the projectile from this. Now if i just parent the projectile to the gun then this obviously fails post ejection and the gun which continues to move will affect the trajectory. If i use a parent/child constraint which then is animated off, this doesnt work either as moving the weight to zero returns the projectile object to the origin.

I need the projectile to remain at the same location in worldspace once i turn off the constraint/parenting at time of ejection.

Infact what ill do is parent the projectile to a locator but i still need that locator to remain in position once the gun fires. Any ideas?

Randolph
08-31-2004, 11:48 AM
Dublicate your projectile, and key the visibility of the original and the copy. At the frame you turn your constraint/parenting of, just hide the original and make the copy visible.

rebo
08-31-2004, 12:39 PM
Im not sure thats a solution tho, because the hidden object still wont be at the correct position when i turn its visibility on.

Ill simplify the problem. I have a sphere moveing from left to right, and a locator somehow parented/constrainted to that sphere. Half way thru the motion of the sphere i want the locator to freeze its position.

Just turning the constraint off, makes the locator jump to the origin.

I dont wish to key the location of the locator at half way, as this needs to be arbitary and changed as needed. I just need it to move along with the sphere then stop when required.

alexx
08-31-2004, 12:54 PM
you can either do that with animated constraints or with particles and the particle instancer which works like a charm for that one.

just parent the emitter under your gund and at the right point emit one particle.

cheers

alexx

rebo
08-31-2004, 01:33 PM
Yea i was thinking emmiters was the best bet. Ill give it a go, thanks.

atzfratz
08-31-2004, 03:42 PM
be sure to apply the constraint on the frame the gun fires the bullet out, then it should work.

CGTalk Moderation
01-19-2006, 02:00 AM
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.