Third person camera
by Brendan Dillon · in Torque Game Engine · 08/29/2005 (3:46 am) · 4 replies
Hi
I've run into a problem with the camera in my game, whenever my character moves near a wall the camera moves up close to him so the wall does not block the players view, which is normal, my problem is that I have transparent wall around the edges of some parts of my levels, for AI reasons, and the camera responds in the same way to these wall and this makes no since to the player as they can't see the wall.
I was wondering if anyone had found a way around this problem like allowing the camera to see through objects like when your in the fly mode or something similar.
I'd be really grateful for any help as time is a major factor with my project.
thanks!
I've run into a problem with the camera in my game, whenever my character moves near a wall the camera moves up close to him so the wall does not block the players view, which is normal, my problem is that I have transparent wall around the edges of some parts of my levels, for AI reasons, and the camera responds in the same way to these wall and this makes no since to the player as they can't see the wall.
I was wondering if anyone had found a way around this problem like allowing the camera to see through objects like when your in the fly mode or something similar.
I'd be really grateful for any help as time is a major factor with my project.
thanks!
About the author
#2
08/29/2005 (7:39 am)
Maby you can do a raycast from the camera to the player and hide all objects that are in between, or just dont render them... just i thougt
#3
08/29/2005 (8:31 am)
I thought about doing that but if an Ai character was chasing the player then they wouldn't be rendered either.
#4
08/29/2005 (10:17 am)
You'd have to filter the hiding.
Torque Owner Brendan Dillon
if(newPos == 0.0f)
eye.getColumn(3,&ep);
else
ep = sp + offset + (vec * newPos);
in
void ShapeBase::getCameratransform(F32* pos,MatrixF* mat)
in ShapeBase.cc
the only problem left is that some objects like pillars appear between the character and the camera and I need to find a wat to see through these,
any suggestion?