My game has a Ferris Wheel with 4 seats. Each seat has a platform that the hero can rest on. When the seat is on the upward trajectory the hero calmly stays on the platform.
However, when the seat is on the downward trajectory the Hero moves up/down a bit.
I've tried a few obvious things: 1. Setting the restitution to 0 has no effect. 2. Setting linearDamping to 1 has no effect. 3. Making the mass of the platform and hero the same has no effect. 4. Adjusting friction has no effect.
Here is the platform physics body:
supportNode?.physicsBody?.categoryBitMask = PhysicsCategory.ferrisPlatform.rawValue
supportNode?.physicsBody?.mass = 1000
supportNode?.physicsBody?.restitution = 0.0
supportNode?.physicsBody?.friction = 0.0
supportNode?.physicsBody?.linearDamping = 1.0
Here is the hero body:
self.physicsBody?.linearDamping = 1.0
self.physicsBody?.mass = 30
self.physicsBody?.restitution = 0
self.physicsBody?.friction = 0
Thanks for any tips. Its definitely bizarre that the hero is fine on the way up on the ferris wheel ride but only shows quirky up/down movement on the way down.
It seems like a problem of mass to me. The platform's mass has nothing to do with it because I read that it's pinned to the wheel. So you should increase the players's mass. If you go in a ferris wheel and make it spin fast enough, you will float too while going down. Setting restitution to 0 is good to avoid bounce, but it won't help keeping a light object in place: it's just not falling fast enough.
Also, you might want to actually increase the friction so the body won't slide. With 0 friction it's like sitting on ice.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With