Struggling with making a soccer ball's physics feel responsive/good to play with

I’m working on a physics-based soccer game and I’m trying to make dribbling/playing with the ball feel responsive and smooth, but the solutions I’ve tried have downsides that I can’t seem to reconcile.

If I set network ownership of the ball to the player that last touched it, I find that it feels nice and responsive when playing around with it solo, but when another player touches it and becomes the network owner, the ball freezes for half a second and that completely ruins the flow of the game.
If I set network ownership of the ball to nil, there’s no freezing, but there’s a noticeable delay between when you press to kick and when the hit registers on the ball, which makes it feel far less responsive than I would like.

An example of a game that achieves this pretty well is Touch Football, although my game requires the player to input a kick instead of just touching the ball: Touch Football - Roblox

6 Likes

bump (morethanthirtycharacters)

1 Like

have you found a solution yet? im struggling with this also

can you provide scripts or video

1 Like

its just laggy physics in general, setting it to the player that kicks the ball helps a bit but could be a bit laggy for other players

1 Like

its not laggy it just has the delay of server-client, my guess would be somehow doing the ball physics on the client or make the illusion that its smooth but ive never tried it before.

1 Like

You can script your own force instead of using one of the built-in forces. Thats what I did and I made a football that travels smooth in air.

1 Like

I’m also struggling with this, however I think Touch Football weirdly enough uses their own physics implementation or replication, because I just got disconnected mid game due to bad wifi, and I was still able to kick the ball atleast 4 times after the “you were disconnected from this game” screen came up, which confirms my suspicion that in Touch Football every client simulates their own ball and ball physics for themselves. I don’t know how they replicate it though, it’s like black magic :sob::sob:.

1 Like

any updates on how to achieve this?

1 Like

I’m bumping, because I also can’t figure this out.

2 Likes

Bumping again, but I looked and found that you can TRY at least to make your own replication system whether its to replace network ownership or smoother physics in general, don’t have much good info atm but there are some games that I know do this, you can maybe look into custom character replication systems for a start

Your best best is to render the ball on the client with your own physics prediction, and reconcile its position with the server, after ball moves on the server, blend it smoothly between predicted position on the client, and actual position on the server, do note that you MUST keep the network ownership on the server.