Hey all, I am wondering if there is a way to see at what angle a projectile is coming into some kind of collision mesh. I am trying to create a bullet system where the incoming angle of the projectile decides weather it bounces or penetrates based on the angle.
You could try using the Break Hit Result and get the impact transform. Might have to do some trig using that transform and the transform of where the bullet came from in order to get the angle you’re looking for. Since I’d think it’s 3D, and lets say someone is high up in the level on a hill and shoots down at someone else, that angle of “penetrate or bounce” would be different math than if those players were level with each other etc.
Due to that fact I would try to calculate this angle based on the normal of the mesh you hit, this way the 3D position will be easier to deal with.
However, the Impact Transform might take care of that for you. I haven’t used it myself, but it might be just what you need. Good luck!
Perhaps the bullet is not oriented in the direction it’s going?
I think so. And I don’t understand why your method should work. Nobody can guarantee bullet orientation.
Whoever programs the bullet can definitely guarantee it. However, if bullet orientation doesn’t work, you can use the bullet velocity instead (normalized). If the bullet can be moved by outside factors, you can always have a post physics tick that does Dir = (CurrentPosition - LastFramesPosition).Normalize();