“You can ditch unreal, which is probably the safest thing to do given the state its in.”
haha I’ve already released the game on steam.
I’ve figured it out anyway. I paused the sim and looked at it frame by frame, with higher velocities the ball ends up tunnelling into the face and on the next frame it ‘corrects’ the tunnelling by basically using the face normal to determine the new velocity. I’ve ended up detecting hits and getting the reflection vector (direction = ball velocity in the last frame, and surface normal = hit.normal), then lerping that reflection vector with the balls velocity last frame and setting the linear physics velocity to that, to get a better result. I no longer get a bounce that feels wrong. I was thinking of switching to a projectile pawn and still might (i assume that’s more deterministic) but this seems to be okay for now.
Here’s what has helped me if anyone is interested.
In the tick function
ballVelo = ballMeshComponent->GetPhysicsLinearVelocity();
In the OnComponentHit function
FVector newVelo = FMath::Lerp(UKismetMathLibrary::GetReflectionVector(ballVelo, Hit.Normal), ballVelo, 0.65f);
ballMeshComponent->SetPhysicsLinearVelocity(newVelo);
Thanks for the input ![]()