-
-
Notifications
You must be signed in to change notification settings - Fork 69
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
Add a HingeJoint2D node to complement HingeJoint3D #1033
Comments
See former issue godotengine/godot#27901 for some simple 2d vehicle features, though the 2D HingeJoint might still be necessary to achieve a better effect. |
Thanks for the response @LinuxUserGD This essentially breaks any collisions for the trailer, and generally seems to be THE WRONG WAY TO DO IT But it is the best work-around I have mustered up |
As we have the PinJoint2D that only needs the addition of a max and min value of the rotation_degree (relative to a zero axis) what kind of implementation would this proposal mean?
@cheesymoo would you specify this more clearly what you have in mind? Just another workaround I used a few years ago: |
@pwab Thanks for sharing your workaround! As far as your 3 proposed implementations, any of those would satisfy my needs.
This is great, it satisfies my needs and is simplest
This is bad, because it removes existing nodes and could break other people's games
This is the most ideal as it brings the 2D joints closer to parity with the 3D ones So I am in support of your proposal 1 or 3. If the community/developers are not concerned about having 2D/3D parity between nodes, than I think 1 is the quickest/easiest solution |
I really needed this to create a simple Knee animation in a Human Shaped RigidBody2D , we hope it will se some light in the coming Godot version . |
Hey @MrZak-dev your knee animation should be a perfect fit for the IK-PR by TwistedTwigleg (godotengine/godot#40347). After building his working 2D branch you can simply open some of his samples here. He also implemented constraints with viewable debugging features. (TwoBoneIK should be the best for a human knee but you can also try the FABRIK algorithm for the whole lower limb which is basically the same thing I implemented here a few years ago.) The |
This comment has been minimized.
This comment has been minimized.
@vesk4000 Please don't bump issues without contributing significant new information. Use the 👍 reaction button on the first post instead. |
The motor functionality of the 3D HingeJoint would also be very useful in 2D. I'm currently experimenting with a basic multijointed robot arm-esque model, and need a good way to apply torques around those joints. |
Describe the project you are working on:
A 2D game featuring vehicles and trailer attachements
Describe the problem or limitation you are having in your project:
I would like to attach 2DKinematic or 2DPhysics bodies to each other via a 2D-HingeJoint
Describe the feature / enhancement and how it helps to overcome the problem or limitation:
2D should have a HingeJoint, it is obviously useful as we have a 3D version of it already
Describe how your proposal will work, with code, pseudocode, mockups, and/or diagrams:
It will be analogous to the 3DHingeJoint, just for 2D physics
If this enhancement will not be used often, can it be worked around with a few lines of script?:
I have attempted using other joints and scripting work-arounds, but nothing seems to have the desired effect
Is there a reason why this should be core and not an add-on in the asset library?:
It brings the 2D joints into parity with the 3D joints
The text was updated successfully, but these errors were encountered: