- Home /
Question by
Taldoesgarbage · Aug 14, 2020 at 08:23 AM ·
teleporting
How to teleport one game object to another with offset?
I Want to teleport a game object called "Apple" to the player characters head at all times, So i need to teleport the apple to the player with a y offset of -1.17395. Can anyone comment a script that does this?
Comment
Answer by Artik2442 · Aug 14, 2020 at 09:48 AM
Maybe you can do that:
transform.position = new Vector3 (Player.transform.position.x, Player.transform.position.y - 1.17395f, Player.transform.position.z);
It will make the apple go to the player with an Y offset of -1,17395.
Your answer
Follow this Question
Related Questions
Clearing out an objects force when trying to teleport it. 3 Answers
How to change level and spawn player into coordinates? 1 Answer
How to make an object move after teleporting it to a specific location 1 Answer
Get Direction based on Velocity 0 Answers
How to detect whether a portion of the screen is touched 1 Answer