- Home /
2D Character slows down in a trigger
Hi, I'm experiencing problems with my 2D character. It works perfectly fine it just for some reason slows down when entering a collider set as a trigger? Here is a short video of the problem:
[Video][1]https://youtu.be/ouVvY7aRSJg
Answer by ragamaffin · Mar 29, 2019 at 12:48 PM
Hello, I had the same problem and I fixed it by making new layer called "Diff Layer" and assigning the collider to the new layer. I hope this helps!
Can confirm it works (at least for me)! Thanks for posting, you're awesome.
Answer by swanne · Jul 16, 2018 at 02:01 PM
Hi,
I dont think the player is acually moving slower. I think its the camera being clamped to the edge of the screen. If your player gameObject has a rigidbody2D on it, use a Debug.Log in the FixedUpdate() function to measure the velocity.
I'm pretty sure it's an illusion of the camera
I'm almost a hundred percent certain its not the camera. It has worked before with the only difference being that I made a new character controller?
And it doesn't do it on the other side of the room. I made a new collider which sat in the middle of the room, and the same problem accrued?
Hmm, must be something in the code then. Where is the collider event controlled, in the player script or does the object collider have its own script?
The object collider has it owns script which activates a dialogue box