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 collision between the player and a specific object?

Hello I'm trying to create a pickable object (similar to an ammo box) and my question is: How to detect if the player is colliding with this specific type of object?

Product Version: UE 4.14
Tags:
more ▼

asked Dec 15 '16 at 05:35 PM in Blueprint Scripting

avatar image

J0K3R_12QQ
94 21 24 28

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

1 answer: sort voted first

Add a collision component to your ammo box blueprint. Make sure the collider is set to overlap the player collider. Use On Component Begin Overlap to perform an Equal (Object) check that the overlapping actor is your player blueprint.

alt text

EDIT

This is how J0K3R_12QQ solved the problem as detailed below.

alt text

more ▼

answered Dec 15 '16 at 06:26 PM

avatar image

CometGoat
254 4 8 13

avatar image J0K3R_12QQ Dec 15 '16 at 07:13 PM

I've set up the collision and used the same blueprint and I don't know why, but it didn't work.

Here's the blueprint

avatar image CometGoat Dec 21 '16 at 05:49 PM

Sorry for the later reply, my notification settings have changed.

Can you take a screenshot of your collision settings for both the ammo box and the player?

avatar image J0K3R_12QQ Dec 22 '16 at 05:54 AM

Thanks, but I already found an answer in a different post. I just used OnActorBeginOverlap and connected the OtherActor to Object from CastTo Player and it worked.

avatar image CometGoat Dec 22 '16 at 11:14 AM

That's great to hear! That is another way to solve this. Mark up your comment as the answer to this post so other people can see how you solved 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