Replies: 2 comments
-
i'm not familiar with joints, so excuse my question, but would this be used to defined how shapes are attached to a body, or how shapes are related to each other ? also would this apply to how we use anchorpoint today for the position of renderable compared to a object body ? |
Beta Was this translation helpful? Give feedback.
-
I'll refer you to the Chipmunk documentation for an explanation of joint in Chipmunk terms: http://chipmunk-physics.net/release/ChipmunkLatest-Docs/#cpConstraint-Shapes For a more general explanation, this is how bodies can be connected to one another. A really simple example is a 2D car. It contains three bodies:
And this car also contains two joints:
The axel joint allows the bodies to rotate in relation to one another. A weld is a "strong" attachment that prevents bodies from moving in relation to one another (a lot like how My hope is that we can use these joints to customize how renderables attach to entities and so on. They will be a lot more customizable than Does this make sense? |
Beta Was this translation helpful? Give feedback.
-
anchorPoint
is too basic. It's difficult to use for attachments like Spine, or physics objects like rag dolls, cars, rope bridges, chains, ...A joint provides three pieces of information:
The joint is its own class, and it references the bodies (and their anchor points) and type of joint. The joint class could also have its own physics properties, like strength (the amount of force required to turn an axel, or bend a weld...)
me.Body
references a list of joints.I can envision a rag doll created with
me.Container
, and all of its children (renderables for the body parts) are attached to one another using axel (rotary) joints. Seems like a pretty simple way to use it.Beta Was this translation helpful? Give feedback.
All reactions