Git Product home page Git Product logo

Comments (10)

Ughuuu avatar Ughuuu commented on August 19, 2024 2

Ok, its related to the joint motor. Even if I don't set up motor, the motor is set to 0. However, in this case, rapier tries to stop the object.

The fix will be in case of motor being 0, to set the motor force as well to 0. If not, will set the motor force to Real::MAX for now.

from godot-rapier-2d.

greycheeked avatar greycheeked commented on August 19, 2024 1

I removed the "addons" and "samples" folders to keep it small. (I had both Box2D and Rapier2D as addons in the demo project, both in the current Git version).

PinJoint2DAngLimit.zip

from godot-rapier-2d.

greycheeked avatar greycheeked commented on August 19, 2024 1

Unfortunately, that doesn't work for me. Maybe I just got it wrong. I have done the following in the inspector for all RigidBody2Ds: entered a 1 under RigidBody2D > Mass Distribution > Inertia. Nothing else.
This causes the ragdoll to fly apart after it hits the ground. The individual limbs and the torso move away from each other and whirl around each other without settling down again.

from godot-rapier-2d.

Ughuuu avatar Ughuuu commented on August 19, 2024

Free rotation with angle range? I am unsure what the ask is. You can disable angle range and then it should have free rotation, no?

Also, have you tried setting for angle range also a lower and upper range? Would that allow free rotation?

from godot-rapier-2d.

greycheeked avatar greycheeked commented on August 19, 2024

I left out the angle limits to show what I mean.
In the first video (Godot Physics), the limbs can rotate freely. In the second (Rapier2D), they appear to be rusted in place.

2024-05-12.11-21-43.mp4
2024-05-12.11-20-08.mp4

from godot-rapier-2d.

Ughuuu avatar Ughuuu commented on August 19, 2024

Interesting, can you upload the demo project you have in that video?

And/or lmk what options you enabled on the pinjoint or what flags(eg. disable collision between bodies, lock rotation, etc.)

from godot-rapier-2d.

Ughuuu avatar Ughuuu commented on August 19, 2024

This is really strange, I don't think I noticed until now that the joints work like this. I have tried in the past working with joints and it seemed to have worked well.

I am pretty sure maybe something changed, because I have a softbody addon that uses this exact feature, and the rotation works there. Hm..

from godot-rapier-2d.

Ughuuu avatar Ughuuu commented on August 19, 2024

Ok, after further investigation, it seems the inertia is wrong on shapes.
If I set inertia to custom and set inertia to 1, everything works(in rapier).
If I leave it to auto, it doesn't.

I am assuming it's related to my change where I divide everything by 100 to go from pixel to meters. And I don't divide inertia.

from godot-rapier-2d.

Ughuuu avatar Ughuuu commented on August 19, 2024

So until this is fixed, as a workaround, you can set inertia to custom and set it to 1.

from godot-rapier-2d.

Ughuuu avatar Ughuuu commented on August 19, 2024

Right, if you set custom inertia it also sets the custom center to 0,0.
However i saw it shapes are not centred to 0,0
If you center the shape and move the body, it should work.
I will have a fix though soon, as this is quite a basic functionality.

from godot-rapier-2d.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.