I have a project with NO gravity. I want to give an object velocity (either with impulse or velocity behavior) and provide a linear deceleration to that velocity. I also want to make the object bounce off walls at an angle based on its trajectory. I have two options I can think of to accomplish this, but both have problems.
Situation 1: Use impulse to make the object move FORWARD, and use the built in bounce physics to change the direction when hitting walls. Problem - I don’t know how to decelerate the object in direction of movement.
- Is there a way to apply deceleration to the direction of movement rather than the way the object is facing? Possibly through some math or something?
- Another thought I had was to make the object face the direction in which it is moving, then decelerate the forward velocity like normal. Is there a way to do this?
Situation 2: Use velocity to make the object move forward and decelerate based on what way the object is facing. Problem - Bounce physics don’t work because the object simply continues in the direction it is pointed at, and I don’t know how to program it to bounce off walls at the proper angle.
- Is there a way to make an object change direction based on what angle it hits another object? Ideally it would move like the bounce physics but also change the facing of the object to direction of movement.
Any thoughts or solutions are appreciated.