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

Implement basic sliding joint 3D #311

Merged
merged 1 commit into from
Nov 28, 2024
Merged

Conversation

Stefan-5422
Copy link
Contributor

I filled out the boilerplate code that was already there. For now only the upper and lower limits work. I am unsure on how to implement those. However this at least provides working joints.

Another question: Is there a way to get the position of the joint Node so we can use that orientation for the axis instead of creating it based on the position of the physics bodies?

@Ughuuu
Copy link
Contributor

Ughuuu commented Nov 28, 2024

Hi, started the ci for now, will test it locally to see. Dont know much about the joints api, i know we get a transform from godot, but unsure how to put those correctly into rapier api.

@Stefan-5422
Copy link
Contributor Author

If it is possible I might go ahead and rewrite my code and the other implemented joints (Spherical and revolute) so they match up with the displayed gizmos in the editor.

@Ughuuu
Copy link
Contributor

Ughuuu commented Nov 28, 2024

My guess is you would need to look at the make_functions, eg:

    fn joint_make_slider(
        &mut self,
        joint: Rid,
        body_a: Rid,
        local_ref_a: Transform3D,
        body_b: Rid,
        local_ref_b: Transform3D,
    )

Here you have 2 transforms, and 2 body rids. I think with the body rids you can get the body and their transform if needed also? Not 100% sure tbh what the local_ref_a and local_ref_b is, thats why i didnt make much progress on this also. I wanted to keep on trying with them and see if I obtain something and try to see if it works somehow. It seems godot used for joints bullet and this is their API?

I could also merge this, then merge my other PR that updates some deps, and then you can continue on that if you want.

@Ughuuu Ughuuu merged commit c1b8da4 into appsinacup:main Nov 28, 2024
58 of 62 checks passed
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

Successfully merging this pull request may close these issues.

2 participants