- Home /
Teleport CharakterController
Hi out there, in my new game, Pacman3D (not realy new but very special), I need to teleport my character. I use the build in characterController but when it hit the teleport collider nothings happens. i try it with:
function OnControllerColliderHit (obj : ControllerColliderHit){ if(obj.gameObject.name == "Tor1"){ transform.position = Vector3(xp , 3.3 , yp); } }
why this wont work??
greetings from germany ThisIsTom
Answer by Motionreactor · Mar 03, 2010 at 03:25 PM
I would strongly suggest you use triggers:
Rather than using colliders in that way, which btw will be called every time your character hits the ground (which is every frame pretty much!).
Oh and don't forget to search before posting a question. I typed in 'teleport' and lo and behold someone else had already asked the same type of question. ;)
Your answer
Follow this Question
Related Questions
Creating a character from a capsule 0 Answers
ThirdPersonController script won't run in build 3 Answers
How to make a mesh into a FirstPerson Character? 2 Answers
My Y-Axis on my camera wont work when I use an animation, help? 0 Answers
Script that switches between first and third person controller 3 Answers