#2 GDNet+ - Reputation: 2614
Posted 02 September 2012 - 03:41 PM
Check out our (now available) D3D11 book: Practical Rendering and Computation with Direct3D 11
Check out my Direct3D 11 engine on CodePlex: Hieroglyph 3
Check out our free online D3D10 book: Programming Vertex, Geometry, and Pixel Shaders
Lunar Rift :: Dual-Paraboloid Mapping Article :: Parallax Occlusion Mapping Article :: Fast Silhouettes Article
#3 Members - Reputation: 682
Posted 03 September 2012 - 01:39 AM
(*) All you need is your initial velocity vector v (magnitude = how strongly you throw; orientation = which direction and under what angle you throw), initial position vector p (the grenade position in the player's hand) and a constant gravity acceleration vector g. Then each frame you just update the velocity and position vectors:
v += g * dt
p += v * dt
where dt is the time span between frames and the operations are vector operations.
Edited by Tom KQT, 03 September 2012 - 01:39 AM.
#4 Crossbones+ - Reputation: 3870
Posted 03 September 2012 - 07:18 AM
(*) All you need is your initial velocity vector v (magnitude = how strongly you throw; orientation = which direction and under what angle you throw), initial position vector p (the grenade position in the player's hand) and a constant gravity acceleration vector g. Then each frame you just update the velocity and position vectors:
v += g * dt
p += v * dt
where dt is the time span between frames and the operations are vector operations.
Edited by Bacterius, 03 September 2012 - 07:24 AM.






