Hello people!
I’ve got a top down space sim game I’m working on which is all physics based and I’m having some issues with collision.
The movement of the ship is controlled by set rotation and add force on a small collision sphere at the center of the ship.
Is it possible to add a custom shaped collision component to an actor or does anyone know how to stop my static mesh collision from penetrating through walls when rotated and moving at high velocity?
Original setup:
Issue penetration at high velocity.
I’m using the skeletal mesh for collision because it looks very cool when the mesh contacted with surfaces and bounced off with the correct rotation.
CCD is on.
Collision not working, rotation working
Unfortunately when moving at high speeds (Velocity of 3k+) the static mesh’s collision isn’t enough to stop it penetrating through objects when the ship is rotated to the side.
I’ve tried building a few custom collisions for the mesh and none work (If anyone knows how the mesh interacts with the scene e.g. Vertex normals please tell me as I can try other collision meshes.
I can fix the issue by turning off the collision on the static mesh and turning on collision on the sphere but then I get no rotation from impacting the wall.
Collision Working Rotation not working
I think it might have something to do with the rotation on the static mesh.
It will very frequently go through collision when rotated even when not moving at high speed
Any help or suggestions are appreciated.
The only solution I can think of is getting the hit event checking to see if it hit a wall, and then adding a random rotation force based off the angle of impact from the wall but that would never give me an accurate result.
Also If I turn collision on for both the ball and the mesh it will go through the wall and never seem to check the ball’s collision which is super frustrating.
Thank you!
P.s. I tried turning on sub steeping for physics and that helped partially
(When I was using the static meshes collision) but it still would penetrate through.