Any way to stop physics interaction between objects except gravity and collision?

Alright, so I have assembly that I don’t want to be moved when dropped on the ground, nor by player, nor by other assembies that got dropped down. Basically I want to stop assemblies from inflicting forces on each other. BUT! They should still collide with each other.

I stopped player from interacting with object by Welding non collidable MassPart that has really big density, but if those objects interact with each other they can still inflict force with each other.

So, is there any way to control physics in a way so when one object trying to inflict “force” on other object, it won’t happen. Basically first object will see second object as anchored and won’t move it.

1 Like

You could just Anchor them as soon as they stop moving.
I’m imagining you’d like it to drop and bounce realistically but become immovable after they settle to a position.

This is really really bad way to do it, if 2 objects on top of each other and object below will disappear, object above will just fly, and there’s many many other examples when it can go wrong.

You didn’t mention that the bottom Part may be removed.

Found the solution.

Every physics object should ignore each other now. (Collision Group)
Every moving object should have same collision group that ignores itself.
“PhysicsObject” will ignore “PhysicsObject”

Create an anchored transparent copy for each physics BasePart that can collide.
Clean this part from all children and set Collision Group to Default.
Save it somewhere (as I did in folder called “AnchoredCopies” and add an ObjectValue with Value of object to follow.

Create an NoCollisionConstraint for those copied AnchoredParts
Set Part0 as CopiedAnchoredPart and Part1 as Physics Part it been copied from.

Every PostSimulation frame on Client AND Server change CFrame of copied Anchored part to CFrame of Object it’s been copied from.

RunService.PostSimulation:Connect(function()
	for _, AnchoredCopy in pairs (game.Workspace.AnchoredCopies:GetChildren()) do
		AnchoredCopy.CFrame = AnchoredCopy.ObjectToFollow.Value.CFrame
	end
end)

Congratulations! Now Physics objects can’t move each other but still Collide and are affected by gravity. That’s because instead of interacting with physics objects they are touching, they are interacting with their anchored copies, that means it will collide with object, but won’t inflict any force upon colliding.

If you also don’t want character to move those objects, create a Character Collision Group that will ignore Collision Group that all physics objects have and set it to all Character parts.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.