Hi, I’d like to create a realistic ballistic system for my first person shooter, not 100% real life simulation, just some simple penetration and velocity sim.
So far I have my weapon base with a few weapons. I can’t decide between using “projectiles” or “Predict Projectile Path By TraceChannel” (virtual projectiles). Projectiles simulate bullet drop already, not sure if the second option does.
My questions are:
- Projectiles or virtual projectiles (line trace)? Which one will give me the ability to do something like this:
- I’ve tried using projectiles with Event Hit to draw a plane that shows the direction of the impact, but i can only get it to trigger one event hit. I can’t get the projectile to keep moving through the object as shown in the image above. Should I use overlap events instead?
If anyone has any suggestions/input that would help me out a lot. Thanks! I hope I explained what I’m trying to do clearly.
There are many ways to do this, but here are two possible methods:
Use overlap all on your projectile. Then on each actor (walls, props, other players) in your game have a value between 0 and 1 that tells how much it stops the projectile. Each time you overlap, add that value to the projectile. Each time you overlap also check to see that the value is less than 1. You can also modify the projectile velocity to slow down the bullet if you wish. When it is equal to or greater than 1, then destroy the projectile.
Another method is to use a multi-line trace. The line trace will return an array of hit objects. You can then loop through in order and pretty much do the same thing we did for the projectile. This will then tell you the last thing it hit and you can ignore any hits in your array that go beyond where the value on the projectile was equal to or greater than 1.
There’s a great tutorial for realistic projectile physics by MipMapGames. It’s pretty realistic and includes air resistance, penetration, etc
I followed video steps in making the Compute Exit Location function, but it isn’t working. My bullets are just disappearing after they hit something!! لیزر موهای زائد