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"

Can't get Event Hit to work, help!

Hey all,

I've been trying to figure this out for the past couple of hours and I'm starting to turn a bit crazy. How can I make sure that when my object (in this case a tomato) hits a wall, the game will detect this? I'm using a print string to test this, so far no luck.

Eventually my end goal is to have the tomato hit the wall, disappear and spawn a particle and decal at the hit location. But if I can't figure out how to get Event Hit to work, all of this won't be happening...

I tried using Overlap events, of which the result was that it was kinda working except that the detection (so the print string) already started when the player lets go of the tomato instead of the tomato hitting the wall. Also according to the tooltip, I should be using the Event Hit node for my goals.

I even tried using trigger volumes, but also no results...

Here are some screenshots: alt text alt text alt text alt text

Someone please help me out!

Thanks in advance :)

Product Version: UE 4.15
Tags:
more ▼

asked Mar 30 '17 at 04:58 PM in Blueprint Scripting

avatar image

Stradis
50 16 16 19

avatar image CDMcGwire Mar 30 '17 at 06:38 PM

Did you try checking the the physics layer it's colliding on? That's usually the start of my physics problems.

avatar image Stradis Mar 31 '17 at 08:39 AM

What exactly should I be looking for? Do you mean the collision settings (see screenshots in my original question)?

avatar image ASCrake Mar 31 '17 at 02:04 AM

I can't say if this will solve the issue or not, but have you tried changing 'collision enabled' to both physics and query for the wall? Might be worth a shot, at least.

avatar image Stradis Mar 31 '17 at 08:38 AM

I have tried that, but unfortunately that did not solve the issue

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

1 answer: sort voted first

Hi

I'm not sure where you are checking hit events, this is unclear. Simple way below:

  1. create blueprint for your tomato as BulletProjectile.

  2. in this blueprint, event graph should be something like this

alt text

This will create effect in any place where tomato hits, how long this place have collision enable - wall or actor. After effect, tomato will be destroyed. You can add before destroy decal, other effects etc.

tomato.png (80.4 kB)
more ▼

answered Mar 31 '17 at 02:32 AM

avatar image

Vaheva
1.3k 24 25 49

avatar image Stradis Mar 31 '17 at 08:42 AM

This is basically what I already had set up, and that did not work for me.

When you say "create blueprint as BulletProjectile" I assume I need to create a simple Actor blueprint, am I correct? Is there a special blueprint class I should need? The only other option I can think of is Object (which is what comes up when I type in either bullet or projectile), but not sure if that is the right one.

avatar image Vaheva Mar 31 '17 at 09:37 AM

in your blueprint you checking other component for simulating physic? This is your bullet blueprint? Wall can't simulate physic. Ok can, but I'm sure this not.

And you are checking that this is bullet tomato. You can't check it in tomato blueprint on Hit event. You can check it in other components blueprint, but what the point?

You should check fps sample project, here is bullet projectile with some code.

Bullet projectile blueprint is different class. Click show all class, type projectile, you will see.

avatar image Stradis Mar 31 '17 at 09:48 AM

I can't find the projectile blueprint class, it doesn't show up. In the FPS sample project the projectile is actually an Actor blueprint, so there should be a way to make this work.

I'll look into this, thankyou for your suggestions!

Edit: solved it! The mistake was indeed with checking the other component for simulating physics. I followed a tutorial where this was done, I now realise why that doesn't work!

avatar image Vaheva Mar 31 '17 at 03:21 PM

alt text

Create Basic Asset/Blueprint Class/ All classes - type projectile. Select this BulletProjectile, I have other child, this is other matter.

(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