Jump to content

zdepth for weapon?


CreativeOcclusion
 Share

Recommended Posts

I have just started working with leadwerks. i have been playing with the tunnels.sbx example. i was just wondering if there is a way to control the zdepth of the weapon to keep it from poking through the walls? i have looked at the fpscontroller.lua in the scripts file and and tried to increase the radius of the controller, but the gun still goes into the wall. any help will be appreciated.

 

thanks in advance.

Link to comment
Share on other sites

You could try disabling the weapon's material depthtest by setting depthtest=0 in the mat file

 

This is taken from the Materials section on the Wiki:

depthtest

If disabled the surface will be drawn on top of all previously rendered surfaces. However, triangles within a surface may not appear in correct order.

 

This might cause issues of its own though!

 

Intel Core i5 2.66 GHz, Asus P7P55D, 8Gb DDR3 RAM, GTX460 1Gb DDR5, Windows 7 (x64), LE Editor, GMax, 3DWS, UU3D Pro, Texture Maker Pro, Shader Map Pro. Development language: C/C++

Link to comment
Share on other sites

One other way I've seen suggested to avoid this issue is to raise the weapon when approaching obstacles (some simple ray casting would facilitate this).

Intel Core i5 2.66 GHz, Asus P7P55D, 8Gb DDR3 RAM, GTX460 1Gb DDR5, Windows 7 (x64), LE Editor, GMax, 3DWS, UU3D Pro, Texture Maker Pro, Shader Map Pro. Development language: C/C++

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.
Note: Your post will require moderator approval before it will be visible.

Guest
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.

 Share

×
×
  • Create New...