Question on weaponimage anti clipping mechanic
by Kyrah Abattoir · in Torque 3D Beginner · 10/12/2012 (1:10 am) · 4 replies
So I know this is a "feature" inherited from Tribes 2, the way guns "retract" when it is about to collide with world geometry.
I was wondering if it could be changed "easily" so instead of retracting the gun, it would block the player.
To understand what i mean, in the Operation flashpoint/Armed assault serie, long weapons are undesirable for indoor usage because the barrel will tend to get stuck in small places, doorways and frames.
Alternatively, instead of retracting the gun, how about raising the barrel (for handguns for instance) or simply lower the weapon (for rifles), would it be easier?
I was wondering if it could be changed "easily" so instead of retracting the gun, it would block the player.
To understand what i mean, in the Operation flashpoint/Armed assault serie, long weapons are undesirable for indoor usage because the barrel will tend to get stuck in small places, doorways and frames.
Alternatively, instead of retracting the gun, how about raising the barrel (for handguns for instance) or simply lower the weapon (for rifles), would it be easier?
About the author
3D artist, programmer, game designer, jack of all trades, master of none.
#2
10/14/2012 (7:12 am)
what about the first part? could you for example block the player from moving /turning the view in a direction that will trigger weapon collision?
#3
There is a Resource from a year and a half ago that shows how to implement animations in place of the weapon push back mechanic. Search for weapon push back. It would have to be ported for use in T3D, but that's fairly trivial from what I remember of it.
10/15/2012 (2:10 am)
ShapeImage's look for a retractNode in your weapon. If there isn't one it uses the muzzleNode. The player class checks to see if a player has an image mounted, shoots a raycast from the retraction node to see if it intersects with various object masks, if so it pushes the image backwards until it is no longer sticking through walls/objects.There is a Resource from a year and a half ago that shows how to implement animations in place of the weapon push back mechanic. Search for weapon push back. It would have to be ported for use in T3D, but that's fairly trivial from what I remember of it.
#4
What i'm wondering essentially is if there is some way to force the player to take a step back to "extract" their weapon from the narrow gap they where shooting from.
I suppose i could just "disable" the movement that trigger the collision with the retraction node and have retraction occur anyway in the worst case scenario (player is falling down and his gun retraction node snag on something)
10/15/2012 (3:47 am)
Is there a way to add the retraction node, in some way to the player model collisions?What i'm wondering essentially is if there is some way to force the player to take a step back to "extract" their weapon from the narrow gap they where shooting from.
I suppose i could just "disable" the movement that trigger the collision with the retraction node and have retraction occur anyway in the worst case scenario (player is falling down and his gun retraction node snag on something)
Associate Ron Kapaun
3tdstudios.com
Ron