Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
1

How do I go about changing the physics for my golf game?

Asked by 2 years ago
Edited 2 years ago

I'm trying to make golf with similar physics to Super Golf, but Roblox physics doesn't feel right.

PROBLEMS

1. Gravity does not feel right

2. The ball slows down too quickly

3. I can't get the putting to feel right

4. The ball does not seem to "roll" down slops

5. The ball is too bouncy

WHAT I ALREADY TRIED

1. Changing workspace.gravity to a lower value (50)

2. Setting every part's CustomPhysicalProperties.Friction vary low (0.01) AND Setting every the ball's CustomPhysicalProperties.Friction vary low (0.01)

3. Changing the function when calculating the impulse

WHAT I NEED HELP WITH

I need help with:

A. Finding a function to make puts similar to *Super Golf *

B. Making the Gravity + another thing I listed feel better

CODE

...

localMouse.Button1Up:Connect(function()
    local Humanoid = localChar:WaitForChild("Humanoid")

    local function impulseCalculator(strenght: number, direction: Vector3)
        return direction * map(math.min(strenght, 10), 0, 10, 1000, 5000)
    end

    print("Hit!")

    -- Change the state to Freefall For it to work
    Humanoid:ChangeState(Enum.HumanoidStateType.Freefall)

    localChar.PrimaryPart:ApplyImpulse(impulseCalculator(strenght, dir))
end)

EXTRA

If you want me to send more code, just tell me, and I'll add it!

Answer this question