I’m making a gambling machine for a game that doesn’t gamble with real money (don’t worry), it’s for a commission and I’m almost done with everything but I’ve noticed that the ball phases through some parts that are welded to main parts (both have cancollide on). Here’s a video:
(I also was looking for collission groups as well, checks out there as well)
Are the parts mesh parts? Make sure that the “Collision Fidelity” property is set to exact or whatever it’s called. Note: Having a lot of mesh parts with high collision fidelity may cause lag.
Are you rotating the parts with physics or by CFrame?
Physics doesn’t work properly when the other parts aren’t using physics (for example, if the ball hit a thing rotating with physics, it would gain velocity in the same direction when it bounces off, but if it’s by CFrame, the thing has no velocity so this doesn’t happen and the ball can clip).
If you’re rotating the pannels by CFrame you’ll need to rotate them with physics, or slow them down a bunch (though physics is the correct answer, as clipping can happen at almost any speed since the ball can be the one moving fast).
You’d use an AlignOrientation (or a BodyGyro, though that’s depreciated), you’d create a joint then use an angular velocity, or you’d create a motor type one (I think they use Hinges for that? Idk, I have less experience with those).
Manually setting the CFrame isn’t physics based, so the physics engine can’t predict things like what the ball should do, which results in clipping. In fact, the only way the panels can move the ball in the first place is because of slight clipping that the physics engine is trying to correct (the panels are basically just teleporting inside the ball and the physics engine tries to fix it).
If your parts have Anchored set to true, it won’t matter that you’ve turned CanCollide off. You have to unanchor your parts and use some constraints for the rotation.
I have like 8 parts per row, everything is welded to the main part you see, so could i rotate the main parts with align orientation and achieve the same result?