What would be the best performance-friendly approach for a wandering object system?

Hello everyone,

I have been working on a wandering system for objects in my project and want to make sure I’m approaching it in the best way.

I want objects to roam naturally in any direction on the client, occasionally stopping. Ideally id like an animation system similar to the pet simulator games, whether through scripting or actual animations.

I am currently using humanoids, MoveTo and PathFindingService to move my objects. However I plan to have a lot of these objects at once and am worried about performance. I’m not so concerned about the objects colliding with each other.

Heres an example of the models I want to move, they would all be fairly close to each other:

Ultimately, Id just like to know the most performance-friendly way to handle wandering animations and movement. Any help or guidance would be appreciated!

For starters, Humanoids are pretty performance intensive. That would be the main thing I would try and remove.

If you can cut out pathfinding by simplifying the movement that should improve performance somewhat too (e.g. if you just want them to walk around in a random direction while staying in an area that doesn’t need pathfinding).

You can do animations without a Humanoid using an Animator.

1 Like

Ok thanks. What could I use instead of MoveTo?

You could directly change the CFrame (it’s client sided) or use BodyMovers (probably AlignOrientation and AlignPosition).

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.