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"

Line Trigger Actor

I'm working on a game involving lasers, and I'm designing it for mobile - so perhaps I'm worrying over-much about the optimization, but I'm having a couple issues regarding some detection.

Currently I have an "emitter" running a line trace to generate the laser. However, sometimes an object will move into the laser beam - and it should cut it off. Unless I'm running a line trace every tick (or every tick when the object is moving), I can't detect it. I mean, I don't know how heavy-duty a line trace is to run - I imagine not terribly, even for a mobile platform - but it'd definitely be easier if I could spawn some sort of "Line Trigger" actor (like box or sphere trigger) that could call an even onActorBeginOverlap. Does anything like this exist? I realize I could just make a really long and thin box or capsule trigger, but that's not quite what I'm looking for... perhaps I'm being overly picky.

Would love some input. Thanks!

Product Version: UE 4.15
Tags:
more ▼

asked May 06 '17 at 06:41 PM in Blueprint Scripting

avatar image

Snipeye
3 1 4

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

1 answer: sort voted first

If there is such thing as a line trigger, I would assume that it would need to do a collision test every frame, too. Under the hood all the collision is done with the PhysX framework. This includes overlapping (like the OnActorBeginOverlap), moving and checking for collision, the physic simulation and line traces. So I think there is no way around a collision test if you want to check when actors collide. The only "optimization" I can think of is to keep your line trace as short as possible.

more ▼

answered May 07 '17 at 10:44 AM

avatar image

Benergy
816 21 4 28

avatar image Snipeye May 08 '17 at 06:49 PM

Thank you - I appreciate it!

(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