how would i stick a rigidbody to another? im trying to make a magnet which makes things stick to it but i cant figure out how. Thanks!
There are a number of classes derived from Joint3D you can look into:
Inherited By: ConeTwistJoint3D, Generic6DOFJoint3D, HingeJoint3D, PinJoint3D, SliderJoint3D
There are probably tutorials out there on using some of these, but I haven't watched any yet.
I am using joint in my current game, look at this discussion I had when I figure this out : https://mcmap.net/q/225/godot-how-to-make-this-body
Im using a pinjoint2d in 4.2b right now, but it is still quite buggy and unpredictable. sad there isnt a fixedjoint2d. is there a way to attach it to 2 pinjoints at the same time to stick it down?
If you're up for it, you might be interested in this Box2D plugin for Godot. It adds a Weld Joint which might do what you need.
Another option is to use _integrate_forces and code the magnetic behavior yourself.
Harl Ill look into it! Just hope it doesnt mess up my gravity / player movement 😃
Harl didnt work unfortunately it broke when the magnet touched anything and i could not find a weld joint
© 2022 - 2024 — McMap. All rights reserved.