Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

parent_shift and body_shift seem to have no effect on MultiBodies with a FreeJoint #210

Open
Kritzefitz opened this issue Jun 29, 2019 · 0 comments

Comments

@Kritzefitz
Copy link

Consider this program:

let mut world = World::new();

let shape = ShapeHandle::new(Cuboid::new(Vector3::repeat(0.5)));
let collider = ColliderDesc::new(shape)
    .density(1.0);

let top_joint = FreeJoint::new(Isometry3::identity());
let body_desc = MultibodyDesc::new(top_joint)
    .collider(&collider)
    .parent_shift(Vector3::repeat(1000.0))
    .build(&mut world);

Testbed::new(world).run()

When running this program I notice that the cube is still suspiciously close to the global origin. Considering that the parent_shift should shift it by 1000 units on each axis, I would expect the cube to be visibly moved or probably even completely out of sight, but no such thing happens and the cube seems to remain comfortably seated at the coordinate origin.

When I use a PrismaticJoint instead of a FreeJoint, the cube is nowhere to be found, as expected. So this seems to be some kind of special behaviour that only affects FreeJoints, but I didn't see such behaviour mentioned anywhere in the documentation, so I guess this is a bug.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant