tipforeveryone Posted February 21, 2016 Share Posted February 21, 2016 Hello everybody, I have 2 problems with my Gun model. 1. In iron sight mode, the Gun intersects with my player camera. 2. When I move close to the wall, the Gun goes through it Show me the right way to solve please I mean how to avoid these problems Quote Link to comment Share on other sites More sharing options...
Brutile Posted February 21, 2016 Share Posted February 21, 2016 I used to know how to do this, but don't remember exactly how. You need to create a second 'World' that only your gun goes in. The second world needs to only draw the gun, not anything else, including any background. That will prevent the gun going through walls, but won't fix the camera clipping issue. To fix that you either need to reduce the near range of the camera, or just move the gun further away. Creating a second world just for the gun will mean that the gun can be as big as you need it to be and it will still look normal. Hope this points you in the right direction 1 Quote Link to comment Share on other sites More sharing options...
tipforeveryone Posted February 21, 2016 Author Share Posted February 21, 2016 I used to know how to do this, but don't remember exactly how. You need to create a second 'World' that only your gun goes in. The second world needs to only draw the gun, not anything else, including any background. That will prevent the gun going through walls, but won't fix the camera clipping issue. To fix that you either need to reduce the near range of the camera, or just move the gun further away. Creating a second world just for the gun will mean that the gun can be as big as you need it to be and it will still look normal. Hope this points you in the right direction Thanks Brutile, I will give this a try. Hope others give me more idea too Quote Link to comment Share on other sites More sharing options...
Josh Posted February 21, 2016 Share Posted February 21, 2016 Scale the gun to a smaller size. 1 Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
Slastraf Posted February 21, 2016 Share Posted February 21, 2016 Yes, scaling it to a very small size and putting it directly in fron of the camera should help,too Quote Link to comment Share on other sites More sharing options...
tipforeveryone Posted February 21, 2016 Author Share Posted February 21, 2016 Scale the gun to a smaller size. Yes, scaling it to a very small size and putting it directly in fron of the camera should help,too Wow what a nice solution, thank you Quote Link to comment Share on other sites More sharing options...
tipforeveryone Posted February 22, 2016 Author Share Posted February 22, 2016 About gun and camera clipping, I have found a shader named viewport_drawdistance in íts pack from Steam Workshop Here is the link: http://steamcommunity.com/sharedfiles/filedetails/?id=256268930 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.