GameMaker Can you find physics joint to world?

With a function like physics_joint_prismatic_create. Could I set the second instance to be the world? So instead of connection an instance to an instance I am connecting an instance to a specific point in the room.

Thanks.
 

TheouAegis

Member
What if you connect an instance to itself? (I don't use Physics, so I'm throwing out ideas I'd consider if I was in your shoes).
 

Bart

WiseBart
"the world" is just another physics instance :)

That "world" instance should be static (density = 0). Its fixture can have any shape and size, since you just need something (any static physics instance) to attach other instances to.
A box shape of a couple of pixels in size already works fine for that.
You can then use that world instance as the second instance in physics_joint_prismatic_create (or any other physics joint function).
 
Top