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"

How to detect if the child of a pawn is hit?

Is it possible to detect a collision with a specific child(static mesh) of a pawn?

For example, a space game's 'BossPawn' has moving children components. A collision with the left of the boss does an event, while collision with the right does a different event.

An 'Event Hit' call can Cast To a parent ('BossPawn'), but I can't find anything on how to check if a child of that parent was collided with (ex. 'LeftWing').

Thanks for the help!

-NINO

Product Version: UE 4.12
Tags:
more ▼

asked Jul 28 '16 at 02:16 AM in Blueprint Scripting

avatar image

TheNINO
8 1 2 3

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

1 answer: sort voted first

Hi there,

yes, you can detect collision with specific meshes.

I guess you do not want to use several Actors and stick them together with ChildActorComponents. If you use a single Actor with multiple MeshComponents that should do. You can move the parts within the Actor like they would be separated parts/Ships. But you need to keep in mind that on movement only the root mesh collision will stop the Ship from going through obstacles. You can also put put a bigger collider around the whole ship to block movement.

Here something to start with:

You need to prepare a Pawn for that. Enable "Simulation Generate Hit Events" for the MeshComponents. And you get their OnComponentHit Nodes by selecting the Event on the bottom of the details. alt text

Hope that helps :) Marooney

more ▼

answered Jul 28 '16 at 04:05 AM

avatar image

Marooney
891 36 8 37

avatar image TheNINO Jul 28 '16 at 04:48 AM

Marooney!

I really a appreciate the detail of your reply. I will certainly be able to work with this. Thanks for the tip too about using ChildActorComponents. It may be better for me to rework some things to take that route.

Thanks a ton,

-NINO

(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