Predict the hit position
I have a cannon that shoots a cube right now at an angle of 45 degrees. Now I wanna calculate the position the cube is going to land from the moment the cube gets instantiated. I really don't know how to do this. Can anyone help or give some tips.
Thx already
As long as only gravity is acting on the cube, it should follow the general rules of Projectile $$anonymous$$otion. If you know the cube's initial speed and firing angle, you can calculate the distance it will travel using the projectile motion equations. Then, as long as you know the direction the cannon is facing, as say an angle from the positive x-axis, you can convert that to x-y coordinates, which will be the landing position.
If you are using rigid bodies, SweepTest might work for you.
Your answer
Follow this Question
Related Questions
How to use physics to make an object face a specific direction 0 Answers
How to calculate correct angles for PID? 0 Answers
Rotate sphere to the direction of movement 0 Answers
How can I bind this script into the state of my camera? 2 Answers
How can I add inertia to a rotation when I release the mouse? 1 Answer