x

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"

Best way to create bullet tracers for hitscan weapons?

Hi! My game uses hitscan weapons (line traces) for gameplay purposes, but i want the visual effects to look like actual traveling projectiles. I've tried several approaches but i always seam to run into problems related to fast-moving actors or particles. Beams are NOT what i'm looking for.

I'm currently trying to particles with a high initial velocity (5000), but i can't find a way to reliably make them stop where the line trace hits something. Calculating the lifetime of the bullets from velocity and trace length doesn't provide precision enough. Kill boxes also let particles slip outside the volume when they are moving fast. Particle collisions makes them stop in the right place but it seams risky to do an individual check not related to the trace.

I know that i'm not the first one trying to put tracer effects on hitscan weapons, how hve other devs managed to do it properly?

Product Version: UE 4.9
Tags:
more ▼

asked Nov 25 '15 at 10:57 PM in Using UE4

Squapper gravatar image

Squapper
11 1 1 4

(comments are locked)
10|2000 characters needed characters left

1 answer: sort voted first

Answering myself because i hate this situation: https://xkcd.com/979/

I ended up going with beams anyway, since only they had the satisfactory precision. Then i feed beam life and length to the material, using those two and some math on the texture coordinates scroll the texture, creating the impression of a travelling projectile. Due to the curent state of beams in cascade, i have to use the Particle Color parameters as a conduit for life/length, since dynamic parameters doesn't seam to work.

more ▼

answered Nov 28 '15 at 03:36 PM

Squapper gravatar image

Squapper
11 1 1 4

(comments are locked)
10|2000 characters needed characters left
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