I am making a really simple 3D ping-pong alike game.
I have 2 players/models who look human-alike. They have arms with multiple colliders. They are placed on left and right side of the screen.
I also have a football/soccer ball. The ball has a sphere collider with bouncy material, bounciness set to 1, and a rigidbody using gravity. it pretty much bounces around in 2 dimensions for now.
The players arms are moved by the actual players.
What I am now thinking is where do I detect the collision? Attach a script to ball and act on
OnTriggerEnter() or do I add
CharacterControllers to the body parts and change ball’s direction,angles, rotation with
Ps. how should I go about detecting how the ball collided with arms? (CollisionFlags?). Also how (after calculation) do I “tell” the ball to go in a direction the player “indicated”?
Any advices and critiques much welcome.