- #1
OyvindAndersson
- 2
- 0
Hello, and +1 for this great forum!
I have encountered a small problem in my way of creating a small game. I have a snowball that is being thrown by the player. The dynamic variables from the input of the player are: Force and angle (between 90 : -90 degrees). At the moment I apply the force like so:
The force is spent in 2 dimensions (Z and Y axes for up/down, left/right). Anyway, that is working quite well, and I'm happy with the result. But what I need is to draw some graphics on the screen to simulate the trajectory the ball will take before it is thrown. Not all the way, but an indication of how the trajectory will be.
If you know the game "Peggle" (perhaps angry birds also?), it is much like that.
Variables I have: Point of launch (vector), angle/direction, gravity vector, and the force that is divided between both the Z and Y axes and mass of the ball (kg).
If any of you could help me calculate the arc of the trajectory so that I could visualize a part of it, I would be very grateful. Alas my math skills does not stretch that far.Oyvind
I have encountered a small problem in my way of creating a small game. I have a snowball that is being thrown by the player. The dynamic variables from the input of the player are: Force and angle (between 90 : -90 degrees). At the moment I apply the force like so:
The force is spent in 2 dimensions (Z and Y axes for up/down, left/right). Anyway, that is working quite well, and I'm happy with the result. But what I need is to draw some graphics on the screen to simulate the trajectory the ball will take before it is thrown. Not all the way, but an indication of how the trajectory will be.
If you know the game "Peggle" (perhaps angry birds also?), it is much like that.
Variables I have: Point of launch (vector), angle/direction, gravity vector, and the force that is divided between both the Z and Y axes and mass of the ball (kg).
If any of you could help me calculate the arc of the trajectory so that I could visualize a part of it, I would be very grateful. Alas my math skills does not stretch that far.Oyvind