Jump to content

Culling mask for weapons


Recommended Posts

I'm pretty sure it already does this. I can't think of any examples where the gun doesn't render over things. The only difference is with T3D it pushes the weapon back as you get close to a wall. I haven't tested it, but I believe the only code doing this is this:


Be advised though, that removing that bit will let you shoot through a wall. Once you move the muzzle into the wall the muzzle starting point will be past the wall and your bullet will start after the wall. I think this can be avoided by just approaching the problem from here:


As far as I can tell removing that bit would prevent the rendered muzzle vector from being corrected for collision, but still leave the actual muzzle vector corrected. There is a chance drawing the weapon is depth tested ( I didn't look ), resulting in the weapon being clipped by the wall you're walking into, this can be avoid by turning off depth testing in the stateblock for the shape image.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...