How to learn to develop a simple ball oriented game such tennis or ping pong

Godot Version

Godot 4.3

Question

Hi, apologies if this question is too high level for this forum. What is a good way to learn how to develop a simple ball oriented game such tennis or ping pong in Godot 3d? I am trying to figure out how to model the motion of the ball, hitting it with a paddle, detecting whether the ball has contacted the paddle, or specific areas of the ground or net.

I’m not worried about having perfectly realistic physics. I’m an experienced programmer and have some experience with godot.

Thank you

I don’t know if this is the answer you are looking for, but maybe you can use the godot physics engine and give the ball an initial velocity. There are defenitly some tutorials on Youtube for that.
for hitting the net, if you use the physics engine, then you can just put a collision3D around the net, and when the ball hits it it will stop.
what I’m trying to say is that if you use the physics engine, it can act as a sort of glue that can connect and help you solve all of your questions.

I think you can achieve a near-perfect representation of your game idea by (if you do use the physics engine) by tweaking and going through all the values.

I wish i could help more, but I don’t normally work in 3D.

P.S. maybe make a pong-like game first to get your ideas down then work to ping pong/tennis which are probaly a bit harder.

2 Likes

Thank you. I appreciate the reply. I have reviewed all the godot assets and searched quite a bit on youtube and google and haven’t found any examples.

I’ve heard of a physics (plugin?) called “jolt” that apparently is good for trajectory - and physics in general. Here’s a link to a post about it. It sort of replaces the physics engine for Godot. Here’s a youtube video for download & use. What I think you can do (assuming you do use Jolt) is just have the paddle (or racquet) hit the ball (that is maybe a rigid body?) and the physics engine will handle all the hassle of gravity, trajectory, etc. You will also have to enable physics for the paddle so it can interact with the ball.

Using Jolt is just a recommendation, you can just use the Godot physics engine, but from what I’ve heard, Jolt is miles better.

Sorry for the late response.