of     1   

C_Sharper
#227412007Friday, November 10, 2017 9:53 PM GMT

Hey guys, so I was trying to experiment making my own friction system. So you know like in real bowling, you can hook the ball and it'll skid down the lane because of oil, but then when there's lesser amounts of oil on the lane, the ball will start to change direction based on the rotation applied to the bowling ball. Roblox does all the physics for me. But I'm not totally in love with the physical options. Anywho, I just wondered if I could see an example code of how to do the following (I tried to do it, but failed when trying to revert the angular velocity of the ball..) So, say we apply RotVelocity to the bowling ball part. Then, give it velocity to skid down a long part with no friction. (the ball would never hook, just keep skidding.) Then, we could use, raycasting for example, to see if the ball is currently gliding on a part with or without friction. If the ray detects that it's time for the ball to hook, we could proceed with the next step: Since there's angular velocity on the ball still, we need to reduce that all the way to 0. And as it reduces, we need to then apply velocity to the ball to send it in the direction of the hook. (the number of velocity would apply on the hook potential of the bowling ball. stronger ball = more hook.) This is where I got stumped though: Fixing the RotVelocity of the bowling ball so it's no longer spinning to the left, I want it to act like in real bowling, when the ball hits the friction, the "RotVelocity" of the bowling ball turns into velocity alone. Sure hope that makes sense.. Thanks!
Dankvisky
#227413358Friday, November 10, 2017 10:31 PM GMT

You could change custom physical properties.
C_Sharper
#227413433Friday, November 10, 2017 10:34 PM GMT

I know. But I would personally like more customization options for the physical chemistry that goes on. Any ideas? ;/ thanks though
Dankvisky
#227413484Friday, November 10, 2017 10:36 PM GMT

I think for your case its customable (customizable?) enough. You would have to do some math to calculate how much weigh and what other settings affect the ball. But other than that i would use roblox's physics.
C_Sharper
#227420989Saturday, November 11, 2017 1:59 AM GMT

I guess I didn't explain it clear enough, I don't want to full-on make a physics system, just a simple-ish system that casts a ray beneath the ball to see what kind of part the ball is rolling on. (high friction, low friction, etc.) Then, slowly start reducing the RotVelocity on the ball and transfer that to actual velocity traveling in the direction of the RotVelocity. (to simulate what would normally happen using roblox physics, but we're doing it our own way instead.) To give us more options. Such as the strength of the hook, duration, and shape.
C_Sharper
#227509958Monday, November 13, 2017 4:21 AM GMT

Hm, anybody have an example code for this? Basically just reducing the RotVelocity, and supplementing for the velocity traveling to the direction of the RotVelocity, and then rotating the ball so it straightens out.

    of     1