How to apply negative acceleration to the forward velocity of an object

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.

  1. 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?
  2. 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.

  1. 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.

Density. Turn it up. To make something mobe backwards, use a velocity.
Make always velocity in a switch that goes forwards jnstead of impulse. After a certajn time afyer the button is pressed, the switch turns off. Thats my preference.

Would density do anything if there is no gravity?


I turned up the density and the object just moves slower, it doesn’t decelerate as it is moving.

To slow an object down, you could extract the current x & y velocity then reverse them and send those values into a motor. I think that will work OK.

Turn up the friction setting on the objects that are bouncing to tune the reflection angle when they bounce.

I actually solved my issue just by turning up the physics drag, but I will keep your suggestion about using a motor in mind. Thanks!

oh, ok - yeah drag will do it as well :slight_smile:

The motor probably wouldn;t work as well because it won’t be as smooth