I’m having problem with “BodyPostion” in my dragging system. It works fine until you move the mouse too fast and make the dragged part collide with other unanchored part, then the unanchored part will fly away. Another problem occurs, when you try to move the part into the player, it will move the player away. I already tried to make the part massless or have 0 density, but it didn’t fix my problem. How can I prevent this from happening, without setting the dragged part “CanCollide” to false, or making custom collision groups? Thanks.
You can make a part uncollidable to specific parts using Collision Groups. This way, the part can still collide with parts of your choice. A plugin like this, or the default collision group editor, will make collision groups easy to configure. Once you’ve made your collision groups, you can script parts to be part of them using these methods and properties.
What if you set
MaxForce really low and have
Massless set to true? Then it shouldn’t have enough force to move other parts or players while having enough force to move the object itself.
I’m sorry, I forgot to mention, that I don’t want to use collision groups either. I want the part to be able to collide with each other or player, but not push them, or throw away. But thank you.
Already tried, but Massless property doesn’t seem to work properly and even with very low MaxForce when given enough speed it will still launch other unanchored parts away. But thank you.
What if you change the density using
CustomPhysicalProperties instead of setting
Also if you set
P lower on the BodyPosition it will travel at a lower speed, so it shouldn’t launch other parts as much.
You could check if the dragged object is moving too fast, then just release the dragging in the script. This could be done with
if Part.AssemblyLinearVelocity.Magnitude > THRESHOLD then -- Release dragging end