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.
Pawn Camera problem
-
- Posts: 335
- Joined: Sat Feb 09, 2008 5:47 pm
- Location: Lanzarote/Canary Islands/Spain
- darksmaster923
- Posts: 1857
- Joined: Wed Jan 03, 2007 10:32 pm
- Location: Huntington Beach, California, USA
Re: Pawn Camera problem
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
Herp derp.
-
- Posts: 335
- Joined: Sat Feb 09, 2008 5:47 pm
- Location: Lanzarote/Canary Islands/Spain
Re: Pawn Camera problem
The script is
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?
Code: Select all
{
Spawn[()
{
Console(false);
LowLevel("Init");
}]
Init[()
{
PositionToPlayer(-65,-5,-35,true,true);
AttachCamera();
}]
}
- darksmaster923
- Posts: 1857
- Joined: Wed Jan 03, 2007 10:32 pm
- Location: Huntington Beach, California, USA
Re: Pawn Camera problem
Jay would probably know the answer, hes done it before on his demo
Herp derp.
Re: Pawn Camera problem
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.
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.
Everyone can see the difficult, but only the wise can see the simple.
-----
-----
- darksmaster923
- Posts: 1857
- Joined: Wed Jan 03, 2007 10:32 pm
- Location: Huntington Beach, California, USA
Re: Pawn Camera problem
you can also try checking for a wall and changing the distance that way,
Herp derp.
-
- Posts: 335
- Joined: Sat Feb 09, 2008 5:47 pm
- Location: Lanzarote/Canary Islands/Spain
Re: Pawn Camera problem
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?
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.
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.
Everyone can see the difficult, but only the wise can see the simple.
-----
-----
-
- Posts: 335
- Joined: Sat Feb 09, 2008 5:47 pm
- Location: Lanzarote/Canary Islands/Spain
Re: Pawn Camera problem
Never mind, it stops if you attach the camera to a pawn simulating a third person game, but with first person mode activated