Game Development Community

Bayonet

by fire maker · in Torque Game Engine · 06/28/2007 (12:08 pm) · 2 replies

How can i make a weapon stab with a bayonet when i right click

#1
06/28/2007 (2:57 pm)
[this is just one possible way]
1. Create a moveMap key for the right click
2. Create a function that gets called from your moveMap assignment
3. Play an animation of the character stabbing
4. Cast a short ray in front of the character and test for collision
5. If collision occurs, calculate damage on struck object if it is an entity.
#2
06/29/2007 (11:30 am)
Thanks