#Need help fixing a problem with a interaction part of my game

1 messages · Page 1 of 1 (latest)

steep linden
#

I was making code for my character to interact with an object. I figuired out how to make the character pick it up and hold it but the object won't go back to its original spot but goes to 0, 0 in the game world.

silent remnant
#

On lines 14 and 15, you created new variables old_pos and old_rot instead of setting the value of the ones declared on lines 5 and 6. This means when you use them on lines 26 and 27, they are still equal to their default values.
You can fix this by removing the var keywords on lines 14 and 15 so you set the variables instead of creating new ones.

steep linden
#

oh it was that simple

#

I was tweakin out for like an hour