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"

Changing the launch player orientation vector depending on the orientation of a trigger

So I made a small system that is making a FPS character wallrun. When I'm entering a certain trigger while jumping and pressing space, the character is being launched away from the wall he's running on.

So far so good, but here's the problem : The launch I'm using is hardcoded vector values. Therefore, It only works on one wall in a very special direction, I could do 4 triggers and make the character launch in 4 directions depending on the trigger entered, but that means I can only make walls in 4 directions. Plus I find entertaining looking for the solution to this.

So I had the idea of retrieving the current orientation of the trigger I'm touching, and depending on its orientation, change the vector I'm launching to player to. After many tries, I could not find a solution, either by taking the forward vector of the trigger or its rotation.

Do you have an idea what tool I could use to find such a thing?

alt text

Product Version: UE 4.18
capture.jpg (61.3 kB)
more ▼

asked Jan 19 '18 at 01:09 PM in Using UE4

avatar image

3 1 3

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

1 answer: sort voted first

Here is an idea for you. Create your own LaunchTrigger_BP actor which contains a collision volume (box, sphere or capsule) you can use to trigger the launch and an arrow component which indicates the launch direction. The arrow is usually not visible in game but only in the editor. This is handy to set it up.

With that, you can place your LaunchTriggers around the level on the different walls and orient them in the direction toward which you want your character to be launched once it enters them.

For the launch functionality, get the trigger your character has entered, get the arrow's Forward Vector and pass it to the Launch Character node.

Hope this makes sense to you. Otherwise please ask again here.

more ▼

answered Jan 19 '18 at 01:51 PM

avatar image

2.2k 10 6 12

avatar image DuskStalker Jan 19 '18 at 02:54 PM

Hello Marco,

Thank you so much for your help, this worked beautifully, I didn't knew about these arrows. Many thanks !

avatar image vr_marco Jan 19 '18 at 03:04 PM

Glad to hear it worked for you! :-) Indeed, they are pretty handy.

(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