Player sees through walls when too close
by ChrisG · in Torque Game Engine · 11/16/2007 (6:48 pm) · 6 replies
When my player collides front on with a wall in 1st person view he is able to momentarily 'see through' the wall.
(Possibly the face the wall is pushed inside the camera's near plane).
I've tried adjusting the players boundingBox in player.cs, but when I start to get results my player can't get through doorways and such. (ie. adjusting the first value in the boundingBox parameter affects the width and depth?!?)
Is there a better way to fix this problem?
[edit] I'm using TGE 1.5.3 [/edit]
(Possibly the face the wall is pushed inside the camera's near plane).
I've tried adjusting the players boundingBox in player.cs, but when I start to get results my player can't get through doorways and such. (ie. adjusting the first value in the boundingBox parameter affects the width and depth?!?)
Is there a better way to fix this problem?
[edit] I'm using TGE 1.5.3 [/edit]
About the author
Currently working on ZDay: www.zdaygame.com
#2
I've not created characters before. Do I need to move the eye and the camera?
Is the modern soldier pack easy to edit and re-export from MAX6 (using the MAX5 files) or are there some tricks I need to know about?
11/16/2007 (8:18 pm)
I'm using the modern soldier pack. When I open the model in max I can see that the camera and eye nodes are infront of the head but just inside the bounding box.I've not created characters before. Do I need to move the eye and the camera?
Is the modern soldier pack easy to edit and re-export from MAX6 (using the MAX5 files) or are there some tricks I need to know about?
#3
11/17/2007 (11:04 pm)
I think you'd want to leave them where they are and extend the box out a bit, but I'm not sure how to do that myself. As to the other questions, I don't really know, I'm not an artist. But I've had that problem before and that was the issue (i.e., you'd get close to the wall and the eye node would be just close enough to the edge of the box that it'd clip through). I suggest possibly asking on the art forums, maybe.
#4
If there are no other suggestions with the modern soldier pack I'll try adjusting the eye node or if that doesn't work - I'll create my own player character. Fortunately my game's only single player so I can get away with 2 arms and a bounding box.
11/18/2007 (9:04 pm)
Hmmm.... the problem is I can't expand the box without the player being too fat to get through doorways etc, and I've spent too long working on art assets to turn around now.If there are no other suggestions with the modern soldier pack I'll try adjusting the eye node or if that doesn't work - I'll create my own player character. Fortunately my game's only single player so I can get away with 2 arms and a bounding box.
#5
Re-exporting the character is easy. Just move the eye node a bit and export as a DTS, replacing the existing soldier.dts (might want to back it up). You won't need to alter any of the DSQ files or do anything else.
11/18/2007 (10:03 pm)
The soldier guy has his camera a little too far away from his face. Just move it closer and you should be fine. I had to do this because the crouchwalk animations I added caused his eye node to move through walls and such, but it's possible to do it without adding animations as you've seen.Re-exporting the character is easy. Just move the eye node a bit and export as a DTS, replacing the existing soldier.dts (might want to back it up). You won't need to alter any of the DSQ files or do anything else.
Associate Ross Pawley