Pathing and Teleporting?

Problem teleportation works but ends up in the wrong place.

Sequential nodes 0 1 2;

0 = Start Node
1 = Teleport to next node don’t walk there.
2 = Location of where to teleport too as it’s the next node.

however on teleport we end up at the purple line not the red circle with the white cone.

This is the teleportation graph.

This is the array of path nodes;
image

So how do I get it to teleport more exactly to the location?

My assumption is;

  1. I’m doing the calculations wrong somehow.
  2. It’s continuing to move during the teleport process and by the time it appears it’s no where near the teleport. (in which case I need to figure out how to condition break the behavior tree ‘MoveTo’ maybe)

Show us the full code of teleportation, all we can see is print string.

Also why are you transforming Path Points using Pawn?

I sort of semi-fixed it, however expecting it to break by subtracting -400 from X, it’s probably not ‘the’ way to do it though.

Path Points is an array held by the ‘Controlled Pawn’, each character follows these points a,b,c and so on until reaching the last then restarting at path point a, unless it reaches a point that says differently, eg. stop, wait, change path or as in this case teleport.

What will happened if you remove Transform location, and just connect straight to Set location?

:smiley: You’ve killed the NPC :wink:

Path Note Point in the image above you’ll notice starts from
A. Local Location : 0,0,0
B. Local Location : 500,0,0
C. Local Location : 1700,300,0

B Teleports to C, so locations start from 0 which means that 0 needs to be transformed to a location in world space, because location is local, just read the node “Transform Location” and yep that is exactly what it’s doing.

Sorry, I haven’t been able to find “Pathing” tab anywhere. Can you point me where it is?

:grin: yeah that got me for quite awhile too…
image

To make groups;
image

Go to Category and type in the box where mine says ‘Pathing’ any name you desire for a category of variables, and you can group your variables in their own little pull out…

Ta-Da

So Points holding different blueprint placed in the world? No the character.

Kind of BP_PatrolPath is basically a blue print with an empty array which you drag out into the world and add points to it, the NPC / AI gets pointed too that blue print like so;
image

in this case I’m telling BP_NPC_Jack which is a child of BP_NPC_MaleBase Character that it’s Patrol Path that it should follow is BP_PatrolPath6.

You need to transform using this BP, not characters transform.

You mean like pre-transform rather than doing it real time, because of some overhead ?

It isn’t, your Pawn hold link to BP that holds array. You need to replace Controlled Pawn with BP_PathPoints on Get Actor Transform.