Discrete Keyframes and Physics Interpolation #13092
Replies: 2 comments 2 replies
-
cc @lawnjelly
This can be a problem for animations that only represent local transforms, but the object is moving in global space by other means (e.g. physics), and we don't want to reset its interpolation every time a new animation plays. It's quite common for stop motion characters (e.g. in DOGWALK) to be moving smoothly in the world, even if their animations are stepped. |
Beta Was this translation helpful? Give feedback.
-
I'm not really familiar with the animation editor. Suspect this requires an issue and MRP, rather than a discussion. Physics interpolation works on a lower level than animation, essentially as laid out in the docs, you need to ensure that objects are:
If the second can't currently be guaranteed in the editor, then maybe the animation editor maintainers can address this, order of operations is important for some operations. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
As it stands, discrete animation keyframes don't play nice with physics interpolation. With interpolation off, properties like position and rotation "snap" into place on discrete keyframes, which seems like the logical behavior. However, with interpolation on, they get, well, interpolated. Adding a call method track with
reset_physics_interpolation
for that keyframe seems to work somtimes, but it's inconsistent. I can only guess this is because the method is getting called before the property is set, and there doesn't seem to be a way to control which properties are processed first when they're set simultaneously by an animation player.This smells like an oversight, and while there are workarounds (making the object invisible for a frame, calling
reset_physics_interpolation
outside of the animation player, etc.) none of them really get me the behavior I want.I think discrete keyframes, as well as the first keyframe, of any transformation-related properties should automatically reset physics interpolation. I realize that there may be issues with this, e.g., updating physics bodies outside of a physics tick, so maybe this behavior should require
callback_mode_process
to be set toANIMATION_CALLBACK_MODE_PROCESS_PHYSICS
.The benefits of physics interpolation seem really attractive, but this behavior is very frustrating. Thoughts?
Beta Was this translation helpful? Give feedback.
All reactions