#is it expensive to create new tweens on every frame periodically?

3 messages · Page 1 of 1 (latest)

tawdry plank
#

I'm creating tweens to move an object smoothly whilst holding a key, but I wonder if lerp could be used instead and might be more performant?

trail obsidian
#

I don't think it makes sense to create tweens every frame for movement. There are better ways

smoky turret
#

Best method for smooth motion, imo:

velocity += (targetvelocity - velocity) * friction

Where friction is a float from 0 to 1; 0 being no change in velocity at all, and 1 being full instant change.