Game Development Community

Rendering Gun Above Everything Else (Again)

by Jonathan Noyola · in Torque 3D Professional · 01/14/2012 (11:05 pm) · 2 replies

I've been trying to solve the problem of the gun being pushed back when you run into a wall. My plan was to disable the offset, which I did. Now the gun protrudes through the wall. I'm trying to find a way to render the gun above everything else now (basically a copy of this thread, but in T3D 1.2).

About the author

I've been programming for 10 years now. Proficient in many programming languages. Stanford '16: BS CS, BS Math, MS CS (Artificial Intelligence). Favorite games: GW2, LoL, Borderlands, NWN2


#1
01/18/2012 (4:14 pm)
The issue of the gun protruding through a wall is what the pushback functionality was supposed to prevent -- which I admit is ugly in appearance, especially in 3rd person. Instead of disabling the pushback which was finally fixed to actually work in the last couple of versions of Torque 3D, I would suggest replacing the pushback function with one that plays an animation of the player holstering or angling his weapon. You could then use the same nodes as the pushback requires to know when to play a newly created a blend animation using the arm bones.
#2
01/18/2012 (8:18 pm)
I guess my biggest problem with the current fix is that when the gun gets pushed back, it gets pushed right into the camera which slices into the gun. Thanks for the ideas, I'll try to work something out.