- Home /
How do I temporarily attach 10 rigidbodies to an animated Kinematic Object - then put them back down?
Making a bowling game, modeling the pinsetter functionality...
I finally figured a way to detect the standing pins (sphere cast directly above each pin) but I'm Having one heck of a time getting the pins left standing ( up to 10 compound collider rigidbodies) to attach to the pin setter when it animates down over them.
Once the pins have been lifted out of the way I have the gate sweep any fallen pins off the deck... which works good.
So the pinsetter comes down twice: once to grab them and the next to put them back down.
Help would be truly appreciated, spend waaaay too much time on this already.
Answer by Muuskii · Oct 10, 2012 at 04:04 AM
Sounds like you want to transform.Parent the pins to the pinsetter. Keep in mind that certain animations may not result in any movement of the kinematic body at all.
If you're just rotating the pinsetter GameObject it will work. But if the animation was made in your modeling software without any bones to parent to; The pinsetter GameObject itself will experience no rotation or translation in order to move the pins.
I did try that briefly without success. i'll have a go at it again and post my code. Now, do I have to make the pins kinematic ? Or can they stay with rigidBody, etc.
Also I'm simply changing the Y value of the pinSetter in the animation window in Unity. Will it still work if its not rotation?
Yes, it's actually recommended against to parent rigidbodies, guess I should have mentioned that. Unless you have kinematic bodies involved.
That solved it... Thanks for the help! $$anonymous$$uch appreciated!
Your answer