Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Office Holiday

Epic Games' offices will be on holiday from June 22nd to July 7th. During this period support will be limited. Our offices will reopen on Monday, July 8th. 

Best way to go about creating realistic ballistics?

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: 1. Projectiles or virtual projectiles (line trace)? Which one will give me the ability to do something like this: image 2. 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.

Product Version: UE 4.21
more ▼

asked Jan 20 '19 at 09:22 PM in Blueprint Scripting

avatar image

3 3

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

2 answers: sort voted first

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.

more ▼

answered Jan 21 '19 at 05:34 AM

avatar image

2.6k 62 26 281

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

There’s a great tutorial for realistic projectile physics by MipMapGames. It’s pretty realistic and includes air resistance, penetration, etc


more ▼

answered Jan 21 '19 at 09:22 AM

avatar image

130 12 8 21

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question