Chad:
I think you mean "Parabolic motion of a projectile". :-)
Octo:
No, no, no! Constant rotation will give you a circular arc and will yield highly unrealistic effects (especially if you shoot straight up!)
He's not telling him to...
...oh wait, he is.
WolRon:
You shouldn't use MoveEntity. You should use TranslateEntity.
First you translate your gun's normal into global space like so:
TFormNormal 0, 0, 1, Gun, 0
Then you multiply that normal by the speed of your projectile:
Bvx# = TFormedX() * BulletSpeed#
Bvy# = TFormedY() * BulletSpeed#
Bvz# = TFormedZ() * BulletSpeed#
Then each frame, you multiply 9.8 by the number of seconds that that frame took to render, (Secs#) and subtract the result from Bvy#.
Finally, you move the bullet with translateentity each frame, like so:
Translatentity Bullet, Bvx#*Secs#, Bvy#*Secs#, Bvz#*Secs#
Oh, and use AlignToVector Bullet, Bvx#, Bvy#, Bvz#, 3 to align the bullet's Z axis with the direction it is traveling in.
I think you mean "Parabolic motion of a projectile". :-)
Octo:
No, no, no! Constant rotation will give you a circular arc and will yield highly unrealistic effects (especially if you shoot straight up!)
He's not telling him to...
...oh wait, he is.
WolRon:
You shouldn't use MoveEntity. You should use TranslateEntity.
First you translate your gun's normal into global space like so:
TFormNormal 0, 0, 1, Gun, 0
Then you multiply that normal by the speed of your projectile:
Bvx# = TFormedX() * BulletSpeed#
Bvy# = TFormedY() * BulletSpeed#
Bvz# = TFormedZ() * BulletSpeed#
Then each frame, you multiply 9.8 by the number of seconds that that frame took to render, (Secs#) and subtract the result from Bvy#.
Finally, you move the bullet with translateentity each frame, like so:
Translatentity Bullet, Bvx#*Secs#, Bvy#*Secs#, Bvz#*Secs#
Oh, and use AlignToVector Bullet, Bvx#, Bvy#, Bvz#, 3 to align the bullet's Z axis with the direction it is traveling in.