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"

Deal damage along shape/mesh etc.

I want to deal damage along an arbitrary shape which should work like a damage volume in a way.

More specifically:

a) Let's say I want to hit a destructible wall and make a star pattern hole in it. I'd imagine I'd use a star shaped mesh that deals damage to anything it intersects? alt text

b) Imagine I have a powerful beam that doesn't deal damage only to the first thing hit (as would happen with a line trace and radial damage for example or a projectile) but i want it to deal damage to everything in an imaginary cylinder around a straight line ahead of me (So all buildings for example would have a hole in a straight line one punch man style). Again I would imagine I use a cylinder and apply damage to anything in it? alt text

Is this possible or do I need to do this another way? Would I need to trace everything manually and apply some kind of damage to every point separately? I dont mind if it's in c++ or blueprint I just want to know whether I can use a custom shape to define where damage is dealt.

Product Version: UE 4.10
Tags:
1.jpg (211.0 kB)
2.jpg (270.3 kB)
more ▼

asked Feb 27 '16 at 02:27 AM in Blueprint Scripting

avatar image

Akastus Venedict
3 1 3

avatar image Akastus Venedict Mar 01 '16 at 04:50 PM

no ideas? I'm still searching for a solution :(

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

1 answer: sort voted first

There diffrent type of traceing called Sweep

https://docs.unrealengine.com/latest/INT/API/Runtime/Engine/Engine/UWorld/SweepMulti/2/index.html

But it's limited to specific shape selection, thats because the way that tracing is computed, complex shape collision computations are... well complex :p

Alternativly you can apply damage via collision overlap, you can get all overlaping actors via this function:

https://docs.unrealengine.com/latest/INT/API/Runtime/Engine/GameFramework/AActor/GetOverlappingActors/index.html

But this might be too heavy function to do on tick.

I linked API refrence, but those functions are on blueprint also

more ▼

answered Mar 02 '16 at 01:17 AM

avatar image

Shadowriver
37.8k 937 172 1123

avatar image Akastus Venedict Mar 02 '16 at 03:10 AM

Hmm seem to do the trick thanks. My only problem is that the destructible mesh only registers multiple collisions after it's been fractured so the first shot only gets 1 hit. Any idea if I can start with a fractured mesh? (or I could cheat and trace twice)

(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