Skip to content

Optimizing

William Caine edited this page Apr 12, 2024 · 2 revisions

Building ontop of the Ininity Engine adds another layer of processing to the scene as a whole and could impact performance. Follow these best practices to ensure your scene runs smooth as possible.

For Better Results

  • Keep the number of tracked MovesWithWorld components to a minimum. Parent objects as a much as you can, and assign just the parent to MovesWithWorld.

Things to keep in mind

  • The more items the MovesWithWorldSystem has to move, the worse performance will be.

  • Keep the number of tracked MovesWithWorld components to a minimum. Parent objects as a much as you can, and assign just the parent to MovesWithWorld.

  • If you assign a Transform.scale to a parent entity using MovesWithWorld it will affect the positions of the children.

Caveats

  • Can be difficult to conceptualize. The player is held in one place by the Avatar Trap and the world is moved around them.

  • Will not work with any library that manipulates the Transfrom.position component, unless those libraries account for accepting an alternative component, MovesWithWorld.position. For example: SDK7 Utils, NPC Toolkit, etc.

    • I do have ideas as to how these libraries could support alternate components.
  • MovesWithWorld not work with Tween, as Tween manipulates the Transfrom.position component, but the Infinity Engine uses Transform to perform its work too.

Clone this wiki locally