I’ve looked up a lot on how to achieve the desired effect of the pawn sliding or bouncing off of collision, but I can’t seem to find a solution.
I’ve tried setting both the pawn and the mesh to have physical materials with 0 friction (as well as all kinds of combos with restitution) but the ship just seems to stop as soon as it hits any collision.
Has anyone figured out a solution for this?
The most important thing for us is to keep the player moving, not having to reverse course outside of collision to resume movement. Whether it’s a “bounce off” effect (without using physics based movement) or to slide along the collision but keeping momentum.
Yeah I saw that response and tried it, even in just the basic flying template, as well as in our project, but it still seems to stop on collide like before.
Hey, I managed to find a temporary workaround for that. I know it’s not perfect, but I feel like I’m on the right path.
I added a capsule for collision in my case.
Add a OnComponentHit on your root and break the hit result to get the hit Normal. Multiply this result by how much you want the ship to bounce. Higher numbers make it more shaky, so I suggest using something between 5 and 10 here. Then, add this as a localOffset. After that, you can set the CurrentForwardSpeed (if using the flying template) to a lower speed, so it feels like the ship slows down when colliding.
As a result, your ship will be bounced back just a little every time it hits something, on the inverse direction. So it feels like it’s “sliding” over the surface.