#anyone know how to make a teleporter?

1 messages · Page 1 of 1 (latest)

normal tinsel
#

Im more new to coding and im making a vr horror game. To get one of the maps from the lobby you need to press a button that teleports you there. Can anyone help me with this?

deep skiff
#

calling "transform.position = yourVector;" on your player is how to teleport
probably gotta disable the charactercontroller component before calling this, and then reenable it afterwards

fallen orbit
#

Depends a little on what you already have.
Can you detect controller position and/or button press at location of the controller?
If so, you can trigger it by detecting a press within the button's collider zone.
Then comes the teleporting part. (moving your player's "transform", like written above.)

Just avoid any linear / unexpected body movements, to not induce motion sickness.
Teleporting is fine. But you can still work with a visual effect once the teleportation itself works. (e.g. fade out/in or other visual obstruction to make it not too jarring for the player)

normal tinsel
#

thanks

ebon tapir
#

Also, specially with VR, you can give the TeleportProvider a destination, and it will teleport you properly.

I use a custom version of one so we can do the proper fade in / fade out that Unity forgot about in their toolkit