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"

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. 

How to add impulse to any Physics object hit by projectile.

I'm new to unreal and playing around with the top down template. I have my character firing a projectile towards the mouse cursor, and then hitting my test boxes with a radial impulse. But I'm looking to add a radial impulse to any object it hits instead of just the box blueprint I'm casting to, or even more ideally, only a specific group of objects (Hit enemies not allies). Here's what I've got.

alt text

Thanks

Product Version: UE 4.8
Tags:
radialhelp.png (108.2 kB)
more ▼

asked Nov 07 '15 at 06:23 AM in Blueprint Scripting

avatar image

Verotrae
1 1 1 1

avatar image ConnorTheScot Nov 07 '15 at 11:13 AM

I would be inclined to replace the on overlap node with a event hit node. Then the target for the add impulse node would be the hit actor.

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

1 answer: sort voted first

If your game is not very big on physics (and thus does not need complicated/realistic phys material setups). You can add certain type of physical material to all enemy actors. Then when you break hit results you can check type of phys material. This way you can determine if it was friendly or foe. You could also put all those materials in array and see if hit material is in enemy array etc. Or in structure with material and some variables describing reaction. But more complicated variants of that check are redundant to what you can do with simply casting to or checking class of other actor.

more ▼

answered Nov 11 '15 at 03:44 PM

avatar image

Nawrot
21 1 3 6

(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