Clipping Problem in Torque
by Gavin Doherty · in Artist Corner · 11/15/2005 (12:17 pm) · 5 replies
I am having a problem with "see through" walls in my game. If the player is in third person view and swings the "camera" into a wall, you can see right through it. It's a glitch that you often see in games. I've attached two screenshots to illustrate it better:


The building is a dif created with Quark/map2dif. All of the code is from the tutorial.base that is included with Torque.
Have I done something wrong, or is this behaviour normal? Is there anyway to fix this glitch?
Thanks.


The building is a dif created with Quark/map2dif. All of the code is from the tutorial.base that is included with Torque.
Have I done something wrong, or is this behaviour normal? Is there anyway to fix this glitch?
Thanks.
#2
11/16/2005 (11:09 am)
I dont mean to be rude but thats the worse advice I have ever herd. Dont go deleteing your map. Your coders probably messed it up while playing around. Have them debug it and go from there.
#3
Sorry I can't give you more detailed information right now - but dig into the code and you should be able to find it.
11/16/2005 (12:28 pm)
There may be some other solutions to the problem, but the best one is to change the collision detection on the camera so that it never gets that close to a wall. The camera code in Torque is pretty bare-bones basic. You'll need to define a "width" for the camera's collision based upon your field of view.Sorry I can't give you more detailed information right now - but dig into the code and you should be able to find it.
#4
I've noticed that this glitch appears in both of the included fps Torque games (starter.fps and tutorial.base). I've temporarily "fixed" the glitch by decreasing the cameraMaxDist value in the PlayerData DataBlock. The camera is now closer to the player making it harder to swing the camera inside a wall. But the camera is closer to the player than I would like. It will do for the moment I guess.
And thanks for the the hints Jay. Still very new to Torque, so I am not yet fully sure of what what you suggested entails. I'll figure it out!
11/16/2005 (1:07 pm)
Well as for my coders messing it up while playing around....I'm a one man game studio, so no chance of that happening! :) No changes were made to the engine, and only minimal changes were made to the tutorial.base scripts. I've noticed that this glitch appears in both of the included fps Torque games (starter.fps and tutorial.base). I've temporarily "fixed" the glitch by decreasing the cameraMaxDist value in the PlayerData DataBlock. The camera is now closer to the player making it harder to swing the camera inside a wall. But the camera is closer to the player than I would like. It will do for the moment I guess.
And thanks for the the hints Jay. Still very new to Torque, so I am not yet fully sure of what what you suggested entails. I'll figure it out!
Torque Owner John Rockefeller