Hi there.
I want to do the following:
|-----------|
OO
OOOOO
OOO
I want a to have a rolling sphere as a wheel, with a platform that is attached to that wheel. The ball must be able to roll in any direction, but the platform must stay in the same place on top of the wheel. I have forces that
work on the corners of the platform to keep it level, but of course the sphere and plaform is connected with a ballsocket joint so it won't roll.
Any ideas?
Ball and platform
Re: Ball and platform
Try connecting your wheel to the platform with three different distance constraints.
This could be done like so:
where platformAnchor1, 2, and 3 are three different locations on the platform.
Since the distance constraints all connect to the same spot on the wheel, its angular motion will be unaffected. The three separate platform connections restrict unwanted relative linear motion.
This could be done like so:
Code: Select all
DistanceConstraint c1 = new DistanceConstraint(platform, wheel, platformAnchor1, wheel.internalCenterOfMass, 0, .2f, 0);
DistanceConstraint c2 = new DistanceConstraint(platform, wheel, platformAnchor2, wheel.internalCenterOfMass, 0, .2f, 0);
DistanceConstraint c3 = new DistanceConstraint(platform, wheel, platformAnchor3, wheel.internalCenterOfMass, 0, .2f, 0);
Since the distance constraints all connect to the same spot on the wheel, its angular motion will be unaffected. The three separate platform connections restrict unwanted relative linear motion.