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 switch-teleport with line trace?

Hello all, I'm very new to blueprints and have been trying to figure out how to do a switch teleport based on line trace hit. In other words, I want my TPS character to trade positions with the actor hit by line trace. Can someone provide some insights as to how this can be done? I'm using the third person template.

This is what I have so far; I'm attempting to first teleport myself to the target's position and somehow teleport that target back to my previous position, but that doesn't seem like the best way. alt text alt text

Product Version: UE 4.15
help.png (129.4 kB)
help1.png (164.3 kB)
more ▼

asked May 24 '17 at 10:51 AM in Blueprint Scripting

avatar image

1 1 2 1

avatar image Milkazar May 24 '17 at 11:55 AM

on hit save your char current location to a variable. Then move it to the hit ACTOR (looks like you are doing component, maybe that's intended). After that set the hit actor location to the saved var vector.

avatar image Ksenius May 24 '17 at 01:53 PM

Many thanks! i got it to work

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

1 answer: sort voted first

Save actors transform before teleportation, then after delay teleport it back to the saved position.

more ▼

answered May 24 '17 at 12:58 PM

avatar image

630 12 13 52

avatar image Ksenius May 24 '17 at 01:53 PM

Many thanks!! got it working :)

avatar image Erumaru May 26 '17 at 05:42 AM

It is better to mark your question as resolved, if you have no problems any more. Choose answer.

(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