Precipitation Clipping?
by Pale · in Torque Game Engine · 11/02/2007 (10:44 am) · 0 replies
Hi all,
So I'm trying to add a snow effect to my game, and using the default precipitation stuff, I got everything working relatively well.
Problem is, the game I'm making is going to use a third person cam that sits relatively far away from the player. It seems that precipitation is only created from the player and directly forward. Therefore, the space in between the player and the camera has no snow and looks silly.
I played with a lot of stuff and found this block of code in the source (precipitation.cc)...
This sounds to me like optimization for first person views, which makes sense. I thought simply commenting this out would solve my issue.
Sadly, it didn't seem to change anything. Does anyone have any thoughts on this?
So I'm trying to add a snow effect to my game, and using the default precipitation stuff, I got everything working relatively well.
Problem is, the game I'm making is going to use a third person cam that sits relatively far away from the player. It seems that precipitation is only created from the player and directly forward. Therefore, the space in between the player and the camera has no snow and looks silly.
I played with a lot of stuff and found this block of code in the source (precipitation.cc)...
//offset the renderbox in the direction of the camera direction //in order to have more of the drops actually rendered box.min.x += camDir.x * mBoxWidth * 0.25f; box.max.x += camDir.x * mBoxWidth * 0.25f; box.min.y += camDir.y * mBoxWidth * 0.25f; box.max.y += camDir.y * mBoxWidth * 0.25f; box.min.z += camDir.z * mBoxHeight * 0.25f; box.max.z += camDir.z * mBoxHeight * 0.25f;
This sounds to me like optimization for first person views, which makes sense. I thought simply commenting this out would solve my issue.
Sadly, it didn't seem to change anything. Does anyone have any thoughts on this?
About the author