x


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

more ▼

asked Mar 03 '10 at 02:55 PM

Tom de Jank gravatar image

Tom de Jank
288 7 7 12

(comments are locked)
10|3000 characters needed characters left

1 answer: sort voted first

I would strongly suggest you use triggers:

http://answers.unity3d.com/questions/4175/moving-teleporting-player-and-camera-when-they-enter-a-certain-area

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!).

more ▼

answered Mar 03 '10 at 03:25 PM

Motionreactor gravatar image

Motionreactor
395 1 5 16

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. ;)

Mar 03 '10 at 03:25 PM Motionreactor
(comments are locked)
10|3000 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Topics:

x1080
x186
x150
x1

asked: Mar 03 '10 at 02:55 PM

Seen: 1291 times

Last Updated: Mar 03 '10 at 03:09 PM