Game Development Community

Disappearing Gun in 1st Person

by David Wheeler · in Torque Game Engine · 12/15/2005 (1:50 pm) · 2 replies

I have created a new player for my game, and for the most part he works fine, except that in first person his gun disappears when I look in certain directions.

The gun is normally visible in first person, but if the camera is tilted anywhere from ~20-70 degrees above the horizon, the gun simply disappears. When the camera is nearly vertical it reappears. This problem doesn't happen when I'm using Kork, so I assume there is something wrong with my character or his eye node.

Does anyone know what could cause this? Did I just place my eye node in the wrong place, or is it colliding with something at those angles?

Thanks,
Dave

#1
12/15/2005 (2:17 pm)
If I'm correct it's the bounding box of the player, try making the bounding box considerably larger, and I think this should go away.

-Max
#2
12/16/2005 (6:39 am)
Yes you're correct Max, it is the bounding box that causes that. This best thing to do is to play with the numbers until you find the right ones. You can see the boundingboxes by setting $GameBase::boundingbox = true, or you can see them in the mission editor. I actually wrote a function to recalculate the bounding box to some very specific numbers as the ones in the datablock that fixed it for me threw off other collisions.