Page 1 of 1

Pawn Camera problem

Posted: Wed Mar 26, 2008 8:08 pm
by Danimita92
Hi, my scripted player has a pawn attatched to it with a certain amount of offsets, and a camera attatched to the pawn. Even if it's attached to a normal player, when I stick to a wall and move the camera, the camera exits the room, showing the level's room, with a not-rendered player. Is there any way to fix this?
If it's been asked already, sorry.

Re: Pawn Camera problem

Posted: Wed Mar 26, 2008 8:37 pm
by darksmaster923
well usually the camera has collision and instead of going thru the wall and stays there, and the player becomes transparent. Jay did this in his towers of tremblon demo

Re: Pawn Camera problem

Posted: Wed Mar 26, 2008 9:17 pm
by Danimita92
The script is

Code: Select all

{

Spawn[()
{
Console(false);
LowLevel("Init");
}]

Init[()
{
PositionToPlayer(-65,-5,-35,true,true);
AttachCamera();
}]

}
Just add the pawn to the level and make the engine start in third person view. Try sticking to a wall, you'll see what happens. Maybe I have to add another command or something?

Re: Pawn Camera problem

Posted: Thu Mar 27, 2008 6:47 pm
by darksmaster923
Jay would probably know the answer, hes done it before on his demo

Re: Pawn Camera problem

Posted: Thu Mar 27, 2008 7:05 pm
by Jay
I don't see any way to fix it completely. Even in my demo there still are times when the camera exits the room (when you are really near to the wall, sadly the walls in the demo were not very thick, i think this made it worse). I think it's a bug in the collision detection. The same bug that can make you fly outside of the level when your speed is really high.

But i don't think it helps that the pawn is positioned behind the player. You see, if the player is on the end of the room, the pawn is then outside of the room and the camera is then attached to the pawn that is outside the room. I think the camera sees this and because of that it is also outside of the room. Try to set the pawn at least to the position of the player, or meaybe a bit in front of the player.

Re: Pawn Camera problem

Posted: Thu Mar 27, 2008 7:08 pm
by darksmaster923
you can also try checking for a wall and changing the distance that way,

Re: Pawn Camera problem

Posted: Thu Mar 27, 2008 9:25 pm
by Danimita92
I set the pawn to detect collision, and i could see through the crosshair that it wasn't exitng the room, but the problem continued. Anyway, thanks for the confirmation. It's a bug.

Solution?

Posted: Fri May 23, 2008 6:45 pm
by Jay
This thread ended quite a time ago, but there may be a solution:

Make the outer faces of all your rooms 'sky-faces'. This causes the faces to be removed from the game, so you may look through. I am unsure if this really works, because it depends on if the compiler still creates portals for the non-existing faces or not. (i think that's very ugly english, but you should understand it...). If someone tries this, an answer to this post may be nice to help other users who may have the same problem.

Re: Pawn Camera problem

Posted: Fri May 23, 2008 7:10 pm
by Danimita92
Never mind, it stops if you attach the camera to a pawn simulating a third person game, but with first person mode activated