2

Don't scale your jump velocity by Time.deltaTime What that says is "If I running at a low framerate, jump higher" which is not what you want. You want a consistent change in velocity no matter whether the button was pressed on a short frame or a long frame. For consistency, you'll want to put your falling acceleration in FixedUpdate, so you get the same ...


1

You should not change the velocity of the RigidBody directly. Try using AddForce instead. if(other.gameObject.transform.position.x > transform.position.x) { rb.AddForce(-hurtForce,rb.velocity.y,0,ForceMode.Acceleration); }


1

This happens because FixedUpdate() is not meant for input handling, as it runs every a certain amount of time (specified in settings) and not in every frame so it's not guaranteed to run every frame. You should add it to the Update() method instead, which is guaranteed to run every frame.


1

I figured it out myself. void AdjustLocation() { float halfWidth = Size.Width / 2; // Current segment back positions Vector offset = (halfWidth * new Vector(Cos(this.Rotation), Sin(this.Rotation))); Vector backPos = this.Center - offset; Vector newFrontPos; if (SegmentsSpacing > 0) { // Current segment front position ...


Only top voted, non community-wiki answers of a minimum length are eligible