Cheap constant forward movement

Hi guys

for my mobile project i want my ship to always fly forward of a constant value,that then will be modified by events during gameplay.
the movements are driven by the mouse,simply offsetting the frontal part of the ship you can go anywhere.
what i’m looking for is the most elegant,cheaper way to implement this.
trying to avoid tick,but i need precision and the system must be versatile
any suggestion?
thanks!

There is nothing wrong with using tick, but anyhow, would the Projectile component work out for you? @kael99;

Tick’s your best bet, but if it’s not a focal point you could move it on a timer instead. Move it every 0.033 seconds to move it at 30fps instead of every Tick (assuming you’re running your game at 60). This will free up some performance for other things if you really need it. Simple translation really isn’t performance intensive though so Tick is almost assuredly fine.

If it’s really a “2d arcade” style movement, I would absolutely use Tick for this.
Tick has a delta-time value, so you offset the position with delta-time times your current velocity. That way, movement will be smooth.

thank you guys

it’s a 3d arcade style movement
i’ll reconsider tick or use timers
intersting the use of projectile component in this way

Yeah, never really thought of putting the player on a projectile. That’s actually a really neat idea, wonder how well that would work out.