A
A
Andrey Alekseevich2021-07-05 10:21:16
JavaScript
Andrey Alekseevich, 2021-07-05 10:21:16

Ball throw physics in JS?

Hello! I am creating a game where a character throws a ball by clicking on the space bar. Please tell me how to correctly implement the physics of throwing the ball so that it flies at the right angle? What parameters are needed?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Alexander, 2021-07-05
@Seasle

Coding Math:
Friction
Ballistics Part 2
Learn JavaScript:
Bouncing
Ball Right Bouncing Ball

I
Imbecile, 2021-07-13
@Imbecile

Phaser.js - everything out of the box
If you want to write yourself, then you need to understand the conditions of the problem. At least the mass of the ball, the angle relative to the horizon and the initial speed are needed. Further more. Consider air friction? Is the ball spinning? The pressure inside the ball and the elasticity of the shell imply its deformation?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question