Hello Guest

Author Topic: Box Collider vibrating  (Read 3068 times)

xecut

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 11
    • View Profile
Box Collider vibrating
« on: May 15, 2013, 06:12:11 am »
Hi,

I want to make some objects there are pushable by player.

So I got some sprites that were attached with a rigidbody.
but they vibrates when the sprites landed on to a platform. Especially when rotated on the z axis, or when the character controller tries to push it.

How do I stop this?

my current gravity is -981...pretty high (using tk2dcamera.)
Is it the gravity's fault?

I am using a pushRigidBody script for my character controller too.
Code: [Select]
   void OnControllerColliderHit(ControllerColliderHit hit) {
        body = hit.collider.attachedRigidbody;
        if (body == null || body.isKinematic)
            return;
       
        if (hit.moveDirection.y < -0.3F)
            return;
       
        Vector3 pushDir = new Vector3(hit.moveDirection.x, 0, 0);
        body.AddForce(pushDir * pushPower);
    }

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: Box Collider vibrating
« Reply #1 on: May 15, 2013, 10:00:03 am »
Really hard to say without seeing it. Could be any number of things.
If you can send me a repro case to support.