Script assistance ledge hang teleporting/Added video.

Here’s the scenerio: My character has an empty parented to him(above his head and a little in front of him) which I’m trying to use for him to teleport to in his climbup function. His ledge hang works fine and he does indeed teleport as I intended except the character is teleporting relative to the empty’s position to the parent, instead of it’s own world position.

function Climbup() {

player_pos.transform.position = ledgeteleport.transform.position;

Invoke( "Climbingup", .3 );

player.animation[].speed = 3;



function Climbingup(){

ledged = false;

player.GetComponent ("kuro_mouselook").enabled = true;

player.GetComponent ("kuro_movement2").enabled = true;

player.GetComponent ("push_stuffscript").enabled = true;

player.GetComponent ("PlayerAtk").enabled = true;

audio.PlayOneShot(jumpSound, 1);


I’ve tried many variations of transform.localPosition, transform.position, transform.TransformPoint(0, 0, 0), ect.

I know I’m working along the right lines, but this has been giving me fit’s for about a week now, and I thought it was time to let someone else take a crack at it.

Thanks to those who take the time to assist.


Ok so here’s the video where I’m trying to debug my ledge climb. You’ll notice when my character jumps his ray that shoots from an empty parented to his main character and the ray moves while in mid jump causing him to grab the ledge at wrong spots and when my character teleports his main transform to another empty parented to him he ends up going through the geometry.

As he changes I toggle the ledge detector on and off as well as his movement script, yet when you press the climb key he seem to keep his velocity and shoots forward as well.

Any help would be aprecciated.

If embed link doesn’t show here’s the link to the video: here


 player_pos.transform.position = ledgeteleport.transform.position;

Will move the player to the location of the ledgeteleport object.