PetrosMarkopoulos
PetrosMarkopoulos

Reputation: 39

Unity animation and movement trouble

I'm using unity 3d v. 5.12 and for some reason, when I'm using an animation (made with unity, *.anim), any changes to a game Object's position are not applied. Please help. I'm totaly new to unity.

Upvotes: 1

Views: 6847

Answers (3)

user5216459
user5216459

Reputation:

Before recording your animations, you should setup the properties of the animation by adding "transform position/transform rotation" in the animation window.

Once you're done recording your animation:

1 Click "Generate motion curves" on your animation object.

[Setup your object with its animation controller]

2 Set the animation controller in your object to "apply root motion" (tickbox)

Your object will now rotate/move independently of the objects rotation/position

Upvotes: 2

Herreracapac
Herreracapac

Reputation: 21

Here's the rule:

  • Any object that has a keyframe in the currently active animation cannot move (except for by the animator), it's FROZEN.

The rule stretches:

  • If there is a transition arrow from the currently active animation to another, that one is considered active and no objects with keyframes in that animation are allowed to be moved outside the animator either.

Summary:

  • If an object cannot move because of the animator, it is involved in the currently active animation or one of the transition animations PERIOD

Upvotes: 1

Nain
Nain

Reputation: 1222

If your animation is animating position component then any changes to position during animation is playing will not affect gameobject it will be controlled by animation. Same case applies to imported animations as well . And not only position if any other component is controlled by animation it will not be affected by code during animation is playing i.e scale rotation etc..

Upvotes: 1

Related Questions