Aiursrage2k
18-08-2007 02:42:57
I am trying to create a third person camera that does not penetrate the walls.
What I have done is created a sphere around my character. Every update I preform a linearsweep --using the sphere to the camera position, if it hits something I set my camera to the hit position.
This causes two problems.
1)If the camera is too close to the character and create some 'weird' artifacts -- ie seeing inside the character.
2)There can be a drastic jump from one frame to the next which results in lose of coherence and even flickering
My solution:
For the first issue I simply take the hit position and add an a vector(0,10,0). Which works for my simple 'test bed'.
To get around the second problem I simply multiply the change in position by a scalar --similar to kenchos 3rd person camera tutorial. This creates a problem where the controls feel sluggish.
The result is not very satisfactory.
What I have done is created a sphere around my character. Every update I preform a linearsweep --using the sphere to the camera position, if it hits something I set my camera to the hit position.
This causes two problems.
1)If the camera is too close to the character and create some 'weird' artifacts -- ie seeing inside the character.
2)There can be a drastic jump from one frame to the next which results in lose of coherence and even flickering
My solution:
For the first issue I simply take the hit position and add an a vector(0,10,0). Which works for my simple 'test bed'.
To get around the second problem I simply multiply the change in position by a scalar --similar to kenchos 3rd person camera tutorial. This creates a problem where the controls feel sluggish.
The result is not very satisfactory.