Performance difference between physics and tweening

Deciding whether to rely on the physics engine or use tweens to optimize performance can be tricky, but I’d like to discuss just one scenario at this time.

Let’s say we’re making a spinning coin that floats in the air. We care about the coin being touchable, but not what happens when it is touched. This coin can be implemented at least two ways:

  1. Set the coin properties Anchored = false and CanCollide = false. Apply constraints/forces to keep it suspended in the air and spinning at a constant rate. Connect a Touched event to the coin.

  2. Set the coin property Anchored = true. Use the TweenService to apply a looped rotation on the coin. Use TouchingParts or Iterate through the players to check if the coin is being touched.

Do we have any intuition as to whether one method is more performant or if they are very similar?

1 Like