Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Friction on Moving Platform
#3
(31-03-2022, 06:58 PM)josemendez Wrote: Hi!

How/when are you applying force to the conveyor belt panels? This should definitely work. There’s an example in the ObstacleRace sample scene, a rotating platform at the end you can stay on top of, relying purely on friction.

Also, make sure friction constraints are globally enabled in your ObiSolver component. (Kinda obvious but just in case! It’s easy to fall prey to that sort of thing)

I'm relatively new to Obi (just bought the assets yesterday), so there's a high chance I missed something or forgot something. When you say that the friction constraints should be globally enabled, do you mean that I should apply the Obi Collider Material to all Obi Colliders? If so then I have done that so far, but if not could you elaborate please.

As for the how and when I'm applying forces to the belt panels, I do that during the fixed update call. Here's some code to show what I'm doing:

Conveyor -> https://pastebin.com/aqExDDMW
PhysicsHelperFunctions -> https://pastebin.com/nhajtU5E

In the conveyor code you might notice I also use MovePosition and MoveRotation, but those are only called when the panels are re-initialized. So they're only called once at the start or when I modify the conveyor belt, otherwise the AddForce and AddTorque functions are used.
Reply


Messages In This Thread
Friction on Moving Platform - by Oxters - 31-03-2022, 05:52 PM
RE: Friction on Moving Platform - by josemendez - 31-03-2022, 06:58 PM
RE: Friction on Moving Platform - by Oxters - 31-03-2022, 08:42 PM
RE: Friction on Moving Platform - by Oxters - 31-03-2022, 10:39 PM
RE: Friction on Moving Platform - by josemendez - 01-04-2022, 07:12 AM