- Home /
Question by
Rincho_lum · Nov 15, 2018 at 09:36 AM ·
rigidbody2dvelocityphysics2dcollider2d
Velocity doesnt change properly
I trying to make a 2D one side collision platform and I dont wanna use effectors. The idea is to use collider.cast and trigger collider. We check what is on collider. If something is there - set a minimum velocity.y of this object to 0. The problem is that the player slowly slides through the platform at a velocity of 0.3 - 0.4. Why is this happening? Sorry for bad english.
Comment
Answer by hectorux · Nov 15, 2018 at 02:25 PM
If you use the OnXStay, this execute with the physics ecuations, meaning that you change your velocity after the gravity actuates. Instead, you could try to just check on the physics time if its collliding and on the fixedUpdate seting it to 0