Quantcast
Channel: Questions in topic: "crash"
Viewing all articles
Browse latest Browse all 2383

(CRASH) how do I fix my teleporter code?

$
0
0
I'm working on a VR game, that needs to have the Player go from one place SMOOTHLY to another, so I tried this code down below, and it Hard freezes the Unity Editor when I use it. --- // Teleport target transform to ground position public void Teleport() { if (groundDetected) { timer = 50f; while (timer > 0) { bodyTransforn.position = Vector3.SmoothDamp(bodyTransforn.position, groundPos + lastNormal * 0.1f, ref velocityPh, travelS); } } else { Debug.Log("Ground wasn't detected"); } }

Viewing all articles
Browse latest Browse all 2383

Trending Articles