Hi, I am making a game about throwing a spear to the shield. After Collision, the spear will attach to the shield. I already create this game in unity and I want to re-create it again in defold.
I struggle to make the spear attached to the shield. I already use 2 different ways to do that, it still didn’t work.
First , using go.set_parent(go.get_id(), go.get_id('/Shield'))
and the output will look like this.
Second, using weld joint
physics.create_joint(physics.JOINT_TYPE_WELD, "/Shield#collisionobject", "my_test_joint", vmath.vector3(0, 0, 0), "/Spear#collisionobject", vmath.vector3(0, 350, 0), { collide_connected = true })
In a second way, maybe it looks works but it only attaches to a specific location, not in the location where 2 objects colliding