Comments (3)
Ok, while true it doesn't work, I would be careful anyway using this way. Rigidbodies should be separate. If you group them as you do, eg RigidbodyA parent and RigidbodyB child,
RigidbodyB will have its set_transform method called every frame. While it might be performance intensive, that's not that important really as it is that it's setting its transform instead of using the velocity. So the physics simulation quality will suffer also, resulting in a lot of jitter.
If you want to group Rigidbodies, I suggest having a parent Node2D for both Rigidbodies and create a scene with those, but dont have child Rigidbodies.
As for this bug, it seems that every time the body position is changed, the reference angle should be updated somehow too I guess, will have to look into it more. But since it's anyway not a use case that should be done, since as I said it's bad for performance and physical stability, not sure if it's worth investing time into fixing this one.
Later Edit:
To explain more on this, it's as if you are teleporting the second rigidbody every frame instead of letting the physics server update it. Which is not necessarily bad, for if you want to teleport the body every frame, either use kinematic body for that or static body. If you don't, then use rigidbody with impulse.
from godot-box2d.
Uh, this seems like a very tricky case. Am wondering what Godot does in this case for rigidbodies parented.
Anyway, I don't see a good use case for it anyway, I think you just shouldn't parent a rigidbody to another. Will ask around on the Godot Chat to see what happens in Godot when you do this(parent rigidbody with child rigidbody)
from godot-box2d.
While this can be mostly avoided by not parenting NodeB to NodeA it might cause headache when trying to structure your scene. For example, when you want to combine multiple RigidBody2D based scenes to create a new scene.
When using Godot default physics the joint limits seem to always be relative to global origin. So, regardless of the "Cube"s orientation the "Antenna" will always point world up as the joint limits are set to [-10, 10]. I don't think that is good behavior but not sure if it is a bug or not.
from godot-box2d.
Related Issues (20)
- Setting gravity through PhysicsServer2d not working
- Must be overridden before calling HOT 2
- ShapeCast get_collision_point always returns 0
- ShapeCast won't detect collision with a shape that is off center from its containing body
- PinJoint2D has an odd "self stabalizing" behavior. HOT 4
- GrooveJoint being weird with pinjoint HOT 1
- CapsuleShape2D causing weird Interaction with intersect_ray and StaticBody2D
- Weird capsule2d behavior HOT 1
- Weird behaviour when a heavy rigidbody falls onto a small one
- Request - implement Pin Joint "Motor Max Torque" from Box2D HOT 1
- When "rough" is checked and friction differs, collision causes objects to disappear HOT 2
- Add support for build_mode = segments in CollisionPolygon2D
- Raycast2D does not work when Area2D scale x is -1
- The collision between the circle and capsule is not correctly. HOT 1
- Box_2d returning errors by the thousands for reasons i cant find out
- Freeing a RigidBody2D containing an Area2D node triggers an error condition
- the mouse_entered signal is only being triggered as if the polygon were a rectangular bounding box
- Pinjoint2D ignoring enabled collisions
- Rigidbody connected with a Pinjoint accelerates for no reason HOT 4
- I encountered an error when queue_free objects
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from godot-box2d.