We will update this in the built-in shaders for the next release.
Is there any plan for Editor support for creating joints already?
Or at least it would be great to see a tutorial or an example! I was following the api, but canât get any effect like e.g. @Pkeod shown above
I have such fragment:
elseif action_id == click and action.pressed then
print("JOINT:")
physics.create_joint(physics.JOINT_TYPE_FIXED,
"#collisionobject", "hero_joint", vmath.vector3(0),
"/joint#collisionobject", vmath.vector3(0))
timer.delay(2, false, function()
physics.destroy_joint("#collisionobject", "hero_joint")
end)
end
No errors, only a printed âJOINT:â ofc.
Here is the joint creation code from one of the examples above
physics.create_joint(physics.JOINT_TYPE_SPRING, "/hero#collisionobject", "string", vmath.vector3(0), "/target#collisionobject", vmath.vector3(0), {length = 60, frequency = 0.3, damping = 0.2})
Thanks! And it also turned out I wasnât using dynamic type of collision object, so thatâs why I didnât saw any changes
You can see the joints when showing debug physics.
Hi! Sorry for bringing up an old topic here. But I canât figure out how you did this. what collision types are you using?
Iâd basically like to make a tentacle which swings around underwater, if that helps.
edit: Okay, i have the thing now! I have tentacle swinging around all over the place.
Okay, I donât understand it again.
This is a physics.JOINT_TYPE_FIXED with a max length of 10, but itâs stretching out (which I would have expected from a spring joint). I had to set the mass of the lower object very high and also set gravity to 99999 just to get it to hang normally without floating up, but I donât want it to stretch the joint. Any help?
Joint must be fixed length and the lower of the two collision objects should be affected by gravity.
Whatâs your physics scale? Try setting it to be lower.
Edit: I read that wrong. Can you upload the project as a zip?
Pkeod, you fixed it despite what your conscious brain was telling you about how to read it.
i think i need to play with physics scale and a few other setting to get this perfect. Thanks!
For fixed joints, make sure you are also setting the max_length in the properties.