How to make a player teleport under the ground on a key press?
I'm new to Unity, i'm making a 3d game that's about digging through ground and sneaking up to enemies. I'm currently making the digging mechanic, the idea is that I made two layers of ground. when you press down E you go under the first layer and above the second and makes the first layer shift. When I tried to change transform.position to the corresponding y position it doesn't work. Is there any way to make it work?
Your answer
![](https://koobas.hobune.stream/wayback/20220613005734im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
How to move a character along the Y axis x amount of units using the G key? 1 Answer
Unity lists not working while using collection generic 3 Answers
Teleportation script isn't working correctly when I go through my object trigger, I don't know why. 0 Answers
V2 binding not visible in options 0 Answers
If statement not working correctly 1 Answer