Animations to work with anchored objects

I’m not sure exactly how this would work, but models with unanchored components aren’t the only thing that need to be animated in games. Static models such as doors, levers on walls, destructible environments (that just fall through the ground), etc are not exempt from needing animations. Currently we have to resort to CFrame animations if we want to animate static models – it’d be nice if they worked with animations inherently somehow.

3 Likes

It should work if some of the parts in the hierarchy are anchored. You just can’t have anchored parts animating. The whole point of marking something as anchored, to the engine, means that it’s not going to move so don’t bother simulating it (or animating it).

Animations use Motor6D, which has the interesting feature of correctly moving parts if 1 of the parts is anchored. I don’t know if this means animations work too, but it’s a thing.

Well, that’s actually why I want anchored animations. I don’t want to anchor the primary part, motor6D the components to the primary (as Spacek suggested), and then animate that because it’ll be more work on the engine since all of the static models I animated would be unanchored like that. I’m not looking for joint-based animations – just CFrame animations that can be built in an animation editor and then played at 60 fps on all clients when the animation is played.

As for how it would work:
Saves offset of all component parts from primary part in animation editor
when animation played, components are offset from the primary part just as they were in the editor
animation loaded clientside so it plays at 60 fps

Since it’s not a good idea to make all of our animated static models unanchored (for the most part), and it’d be preferable to have an animation editor for animating static models instead of using raw CFrame values and coding it ourselves (for the same reason current animations were made to be used in place of manual weld animations), it’d be nice to have this.

Well is there a way to disable physics on a npc character. Because I am moving my npc with tweens rather then using the physics engine. And its causing huge performance issues with many npcs. I still wanne play animations so how would I stop physics from being applied?

Using tweens to move npcs is not a good way to move them
If they have a humanoid I’d suggest using
:MoveTo() or if they dont then use an AnimationController

Tweens should be more efficient. Because moving them through :MoveTo() Requires the npc to use the physics system to traverse the workspace. While using tweens your simply just offsetting the position of the npc which is a lot more efficient. Its true you should use :MoveTo() if you only have a few npcs, but if you have 100+ its gonne crash the game.