Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

High velocity Ball stucking on other parts?

I am creating a golf game Bloxy Golfing that uses roblox built in physics.

To throw the ball, I set the ball velocity to the camera direction with strenght that the player chooses (Ball.Velocity=direction*strenght).

While the ball is being thrown, its given a bodyforce to simulate wind factor (applies while midair) and a bodyvelocity to keep friction (applies while touching ground).

The problem is that sometimes the ball builds a lot of falling speed and ends up stucking itself on the ground. I made so it tries to send it a stud upwards after the throw is finished, but it seems wrong and sometimes it isnt enough to unstuck the ball.

Does anyone know how to prevent roblox physics to stuck a part like this or to fix it in a better way?

3 comments

0

CustomPhysicalProperties might be able to help with that

0

I already tried friction to make the ball stop faster on different ground material, but friction limit isnt enough for a ball to stop on slopes. Elasticity is being used on bouncy parts and seems to work, but not to fix a stuck object. Only if its density, but I don't think it will help me :/

0

I guess i'll use a :GetTouchingParts() on ball and then proceed to make a findpartonraywithwhitelist on them, with coordinates that goes from up to down on the ball. Then I get the intersection position and use it to teleport the ball. Will be a failsafe method at least.

1 answer

I think I have found a way to fix this problem on my game specifically by reducing the game's gravity. Had to adapt the velocities I used to this new gravity but it didn't stuck once since I did this and it doesn't look like it will happen.

This discussion is preserved as it was. New answers, comments, and votes are closed.