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

Joint is wobbly #238

Open
SGTMM opened this issue Jul 8, 2023 · 0 comments
Open

Joint is wobbly #238

SGTMM opened this issue Jul 8, 2023 · 0 comments

Comments

@SGTMM
Copy link

SGTMM commented Jul 8, 2023

So I was working with the rapier.js physics engine but I have been struggling with making kinges work. I wanted to make a simple floating block, this are the coords and scale of the two blocks:

Block 1

{ x: 0, y: 13, z: 0 }, { x: 5, y: 5, z: 5 }

Block 2

{x: 5, y: 8, z: 5 }, { x: 5, y: 5, z: 5 }

This is the joint I am making

let params = rapier.JointData.spherical({ x: 2.5, y: -2.5, z: -2.5 }, { x: -2.5, y: 2.5, z: 2.5 });
let joint = world.createImpulseJoint(params, body1.userData.physicsBody, body2.userData.physicsBody, true);

What happens is that the joint is wobbly and the hinges, which should coincide with the corners of the two blocks, do not stay connected, like there is space in between.

If anybody knows how to fix this, thank you

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