Well you know how the velocity is stored each frame in values like vx, vy, vz?
Well to shoot it in a specified direction you need to figure out the normal of the direction and the magnitude of the force which you want to apply.
To make things simple for you, you can use a pivot.
First, make a pivot.
Next, point the pivot in the direction which you want to apply a force to the ball.
Then do this:
TFormVector 0, 0, Speed#, Pivot, 0
Vx# = Vx# + TformedX#()
Vy# = Vy# + TformedY#()
Vz# = Vz# + TformedZ#()
And that's it. Speed# is for example, 10, if you want to add 10 blitz units per second of speed to your ball. In other words, it would move 10 in the world every second.
I use a scale of 1 unit in the world = 1 meter in my games, so I can say that that is 10 meters per second, which is a lot easier to say and conceptulize. :-)
Anyhow, your ball will then be moving at 10 meters per second minus whatever it was moving in any other direction at the time.
Well to shoot it in a specified direction you need to figure out the normal of the direction and the magnitude of the force which you want to apply.
To make things simple for you, you can use a pivot.
First, make a pivot.
Next, point the pivot in the direction which you want to apply a force to the ball.
Then do this:
TFormVector 0, 0, Speed#, Pivot, 0
Vx# = Vx# + TformedX#()
Vy# = Vy# + TformedY#()
Vz# = Vz# + TformedZ#()
And that's it. Speed# is for example, 10, if you want to add 10 blitz units per second of speed to your ball. In other words, it would move 10 in the world every second.
I use a scale of 1 unit in the world = 1 meter in my games, so I can say that that is 10 meters per second, which is a lot easier to say and conceptulize. :-)
Anyhow, your ball will then be moving at 10 meters per second minus whatever it was moving in any other direction at the time.