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"

Using a shape as a trigger

Hey All! I am trying to make a trigger so that, if i am overlapping with a shape, It updates a variable that makes the character jump. I have done so with a basic cube trigger, But i am now trying to do this with a loop shape: Cubes arent specific enough for this.

alt text I made the loop on screen have a trigger collision preset (As i was going to move it to where the other loop is for invisible detection purposes). However, Nothing triggers.alt text alt text Any idea where i went wrong?

Product Version: Epic Games Launcher
Tags:
1.png (403.0 kB)
2.png (132.3 kB)
2.png (132.3 kB)
3.png (68.2 kB)
more ▼

asked Jul 21 '18 at 07:37 AM in Blueprint Scripting

avatar image

The Bonk Batter
41 1 1 7

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

3 answers: sort voted first

alt text

Change the capsule to your static mesh component and set the jump duration to how much time it takes for the jump to finish.

more ▼

answered Jul 21 '18 at 09:05 AM

avatar image

Placinta8
183 4 4 10

avatar image The Bonk Batter Jul 21 '18 at 10:32 PM

alt text Hello! I tried what you said (In the loop blueprint, Have not set up jump duration yet), And there is still no jump (Only using jump to test as it seems printstring does not work for me), Nor collision. Do i change the loop from a trigger to something else? Thanks

boing.png (74.6 kB)
avatar image Placinta8 Jul 22 '18 at 05:43 AM

alt text

Found a way to do it without the jump duration using the event on landed node. Also, try setting the collision preset to BlockAll, then it should work.

avatar image The Bonk Batter Jul 23 '18 at 01:04 AM

Cool. But, Uh, I set it to block all, then collided with it and checked the errorlog..alt text

oh-no.png (304.0 kB)
avatar image Placinta8 Jul 23 '18 at 05:30 AM

alt text

Put this in your character blueprint. The capsule component has to be the character's default CapsuleComponent and instead of Loop Actor select your loop actor. Hopefully this one works

avatar image The Bonk Batter Jul 23 '18 at 09:25 AM

![alt text][1]

No jump happening, strangely enough. Although maybe I referenced the loop in the wrong way. Thanks for your patience. [1]: /storage/temp/248215-te.png

te.png (257.4 kB)
avatar image Placinta8 Jul 23 '18 at 09:51 AM

alt text

Select the loop class in the == node. If this doesn't work either, connect the On Component Hit to a print string node, it might not be detecting the collision. Also, look at the loop in the static mesh editor and check if it has a collision assigned.

avatar image The Bonk Batter Jul 24 '18 at 05:43 AM

It works! It seems using a class made it work. Huh.

avatar image Placinta8 Jul 24 '18 at 11:28 AM

Don't forget to accept the answer if everything works correctly :)

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

In the mesh settings, of the track, select "use collision complex as simple". The collision of the character does not detect the mesh itself, but the collision mesh (you can click on the collision button to view the avalaible collisions, or press CTRL + C to view collisions in viewport). A track like this, is going to have really screwed up collisions.

The reason that the collision doesn't work then, is that you probably didn't check "generate hit events" in the static mesh settings. It's automatically enabled for overlap events, but not for hit events. Then, in the Track BP, from the hit event, take out the "Other actor" and cast it to you character BP. From the "As character BP" pin call your jump event. Before that you need to have "Do once" though, which you can reset from the character BP by, for example, when the character is not in air anymore (isFalling boolean, or notify event from anim BP?) I tried to upload an image but didn't work.

more ▼

answered Jul 23 '18 at 12:43 PM

avatar image

Pavelioso
41 4 4

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

In the mesh settings, of the track, select "use collision complex as simple". The collision of the character does not detect the mesh itself, but the collision mesh (you can click on the collision button to view the avalaible collisions, or press CTRL + C to view collisions in viewport). A track like this, is going to have really screwed up collisions.

The reason that the collision doesn't work then, is that you probably didn't check "generate hit events" in the static mesh settings. It's automatically enabled for overlap events, but not for hit events. Then, in the Track BP, from the hit event, take out the "Other actor" and cast it to you character BP. From the "As character BP" pin call your jump event. Before that you need to have "Do once" though, which you can reset from the character BP by, for example, when the character is not in air anymore (isFalling boolean, or notify event from anim BP?)

alt text

capture.jpg (236.5 kB)
more ▼

answered Jul 23 '18 at 12:44 PM

avatar image

Pavelioso
41 4 4

avatar image The Bonk Batter Jul 24 '18 at 05:43 AM

Couldn't seem to find the the mesh setting's, Let alone the simple collision. But the other answer worked. I like the ResetFromAnimation BP, Though. Thanks!

(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