[Physics] How to cancel collision effects in integrate forces?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Maveyyl

Hello,

I’m doing a game with vehicles.

I can’t have the player be anything else besides a rigidbody, but I also can’t have the vehicle move because the player moved inside the vehicle and collided a wall.

So I want to cancel the collision’s effect on the vehicle’s velocity.

I’ve tried to get the contact impulse, normal, and position in integrate force and tried to apply an opposite impulse. But it seems like the get_contact_local_normal function only gives me the normal of the face and not the direction of the impulse, and get_contact_impulse gives me a float instead of a vector3.

Is there something I can do?