Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Actors not receiving friction from moving Obi Colliders
#3
(18-01-2021, 08:53 PM)josemendez Wrote: If you’re moving the collider by setting its transform position, you’re not actually moving it in the physical sense of the word but teleporting it from frame to frame. Any physics engine will ignore friction in this case, as friction is a force that opposes relative movement between surfaces, and no force is acting upon the collider to move it. You can test this by placing a rigidbody cube on top of your moving colliders, Unity’s physics engine will ignore friction as well.

The simple answer is that you have to use forces
to move your colliders. That way, frictional forces will be accounted for. This is true for all existing physics engines, not just Obi.

See the included obstacle course sample scene. The rotating platforms at the end rotate via forces (torques), and as you can see there’s accurate friction going on:
https://youtu.be/xQeBA0H4b40

Alternatively, you can use kinematic rigidbodies. What’s important is that there must be a rigidbody in the collider, and movement must affect its linear/angular velocities.

Ah thank you for your response! 

Right this makes perfect sense. I should have mentioned that I am using a kinematic rigidbody (with of course an Obi Rigidbody) and am doing the movement in fixed update. I am a bit confused however when you say that I can use a kinematic rigidbody with forces. My understanding is that these are mutually exclusive.


EDIT:

Of course, the solution is to simply use Rigidbody.MovePosition/Rotation. Forgive me for assuming the issue was within Obi rather than my implementation.

Again thanks for your help, and congrats on the excellent asset!
Reply


Messages In This Thread
RE: Actors not receiving friction from moving Obi Colliders - by NathanBrower - 18-01-2021, 09:35 PM