- Home /
Ball Tracking
Hey guys,
I am new to Unity having migrated from XNA (is that a naughty word here?). Anyways thanks for all the support via documentation so far.
I am attempting to implement a type of ball tracking in my first unity game. What I mean by tracking is think throwing a ball in the air and immediately placing a marker on the ground where it will land and even drawing the path of the ball before it moves.
Many games do this such as baseball games so the fielders can catch it and know when to begin IK solvers of the fielders arms or simply where the fielder should run to to field the ball based on where it will land, or tennis games with 'hawk eye' or 'eagle eye'.
I had some success in C# as I wrote my own basic physics engine meaning I could simply create 2 balls one that ran at normal speed and another that ran at high speed (same forces etc, just faster update/timestep effectively seeing into the future and check for its collision to the ground) To me this felt like a kind of hack way of doing it and running it at high speed meant collisions with the ground could be missed, and now working with Unity and PhysX things are a bit different.
So my question is has anyone implemented a ball traking system, if so is my thinking of knowing the force, force direction, gravity, mass etc and speeding up the physics time for a single object along the right track or is there a better way?
Thanks in advance.
Well, there's one thing which might be of use to you- Trajectory Simulator. Of course, it's fairly simplified, and doesn't take anything like drag into account, but it's a good start.
Fantastic ! Sometimes just need to know what to look for. Trajectory, of course :P
Thanks syclamoth.
Your answer
![](https://koobas.hobune.stream/wayback/20220613062023im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
How do box collider collisions work mathematically? 1 Answer
Ball Aiming System 2 Answers
The Physics of Ball Spin in Tennis, Topspin and Backspin 3 Answers
Simple Collision Deflection (Pong) 1 Answer
pong rolling ball 1 Answer