I have an entity in my scene that can only move in 2D space (sidescrolling) and its velocity can be affected by multiple triggers (push, pull, etc.). I’ve been trying to implement a movement system that allows for loops and twists and turns in a 2d space using velocity only but with no good results.
So far I’ve been applying a certain velocity based on maths every frame or so for X time (the time of the movement) but there’s been 2 major problems:
- It doesn’t react well with the triggers (that pushes and pull) because my function Sets a velocity and doesn’t modify the actual one with a new trajectory.
- Its not smooth, every X time I can see the ball clearly changing trajectory which makes for an unrealistic and annoying experience.
Here’s an image of what I’m trying to achieve:
Many thanks to anyone who tries to help.