0
\$\begingroup\$

I have a sliding animation on this penguin model which moves the penguin from a standing position to a belly position. During this animation, I've noticed that the object transform origin stays locked relative to the animation, using the encoded origin from blender. In my case this is an undesired pivot point and is often buried beneath other game objects I may want to raycast against.

enter image description here

Ideally, I am hoping to have the origin centered in the model with respect to the XZ plane throughout the animation. Toggling the handle position tool to "Center" in the editor gives me an origin that is closer to what I would like, however I understand this is just a feature of the editor and does not reflect the true object transform.

My question for everyone is:

What are some ways I can achieve a transform that follows the body of my animation?

I have parenting an empty game object, but this transform still would not follow the body animation. For raycasting below the body specifically, I am considering following the transform of my armature's spine which does follow the animation. Would this be a valid approach?

Any help is much appreciated!

\$\endgroup\$
6
  • \$\begingroup\$ I think describing your collider situation might help people give you more advice. \$\endgroup\$
    – Adam B
    Dec 18, 2020 at 4:57
  • \$\begingroup\$ the main (and only) collider in this model is currently a capsule collider attached to the armatures most center "bone" which follows the movement of the main body. \$\endgroup\$
    – Lamar
    Dec 18, 2020 at 19:42
  • \$\begingroup\$ So if the collider follows the body, what is the problem ray casting exactly \$\endgroup\$
    – Adam B
    Dec 18, 2020 at 23:59
  • \$\begingroup\$ Is the problem with the source of the ray cast? And are you ray casting against the ground? \$\endgroup\$
    – Adam B
    Dec 19, 2020 at 0:00
  • \$\begingroup\$ @AdamB I am looking for a way to have the transform position follow the body center of mass, so to speak. You can see when the penguin jumps, the penguin's body shifts and the transform position is no longer centered in the penguin. FWIW, I have moved past this problem by sourcing my ray cast from the spine transform position which follows the animation, but I am still curious if I can truly have the transform of a model follow its center of mass. \$\endgroup\$
    – Lamar
    Dec 21, 2020 at 19:19

0

You must log in to answer this question.

Browse other questions tagged .