First off let me just say if I should move this thread to another forum, I figured this might be the best place to put it but I’m unsure about that.
Anywho, I’ve been developing a bowling game. And I’ve noticed this problem with the pins, at random occurrences. Basically, when I roll the ball, it’ll just deflect off of the pins and the ball will go bouncing away but no physics will be applied to any of the pins. (It’s like they’re rigid/anchored at that time of collision.)
One added note is that the pins do use BodyForce for decreased gravitational force for more “pin action.”
This used to happen ALOT when the client did not have network ownership of their pins, but for my bowling game I actually create the entire alley and pins on the client directly, for the best result of physics processing and so fourth.
Very surprised to see this still occurring. Any information appreciated. Thanks
Wild theory, but by any chance are the surfaces of your pins anything but smooth or are the CustomPhysicalProperties of the pin stronger than the ball’s? I have the strongest feeling that the pins are anchored to or connected to the ground in some form, or are able to withstand the ball’s applied force (potentially via CustomPhysicalProperties).
Could you provide a video of this happening for a little more detail?
My guess is that since the pins aren’t moving, no major physics calculations are actually being done, so for optimization sake, they are held in a state where physics calculations are disabled until they are invoked by another object to start moving. With that being said, I’m pretty sure that because the ball is being actively calculated, the physics engine detects that the ball hit something before it sees that the pins did, and by the time the physics wake up on the pin, it’s already past the time where they originally collided.
Strong emphasis on a guess, as I’ve seen a system works like this before but I’m not entirely sure if Roblox works this way.
If this is the case, try checking the magnitude of the ball to the pins, and once the ball is decently close, try offsetting the pins a little bit to wake the physics back up. I’d recommend just a small for loop that adds 0.1 on the vertical axis.
As others have said, it’s due to the properties of the pins. If you could provide a repro with both the ball and pins, that would help solve the problem.
To answer further questions, every rendered model in the game is created on the client, so the client is the owner of absolutely everything that happens physically.
With that being said, this issue only happens sometimes, and I have no way of predicting when it’ll happen again, so providing a video or something would be quite hard to do so.
You can avoid this issue by placing a BodyForce into the pins that acts upwards with a weak force. I found that this sometimes happened in Run mode with static parts.
EDIT: These are called sleeping parts. Roblox automatically “anchors” parts to save performance and active body movers (usually) disable this.
Ahh I see now. Very interesting, thanks for that info.
Although, I actually do use BodyForce on each pin currently to reduce gravity. Unless you’re telling me to create an additional force in the pin and set it to something much lower?
Another thing you could use is to try moving the camera or character closer to the pins and seeing if that affects the pins. Most likely the parts are out side of a certain “range” and roblox has stopped applying physics to them
I actually meant applying some negligent force to keep the parts awake. You could apply just enough force to keep the pins on the ground and disable the mover when the ball is close enough.