Hi everybody. I'm trying to make a system of fixed cameras and for now it kind of works. The camera is supposed to be attached to a pawn that does what the camera is supposed to do (Look at the scripted player)
The fixed camera hooks on the camera pawn and grabs its rotation at first, but when the Camera pawn rotates, the fixedcamera doesn't. It just stays there. Still. I tried the commands like
SetFixedCameraRotation(float RotX, float RotY, float RotZ);
But it doesnt seem to do anything... any ideas?
FixedCamera and script trouble
-
- Posts: 335
- Joined: Sat Feb 09, 2008 5:47 pm
- Location: Lanzarote/Canary Islands/Spain
Re: FixedCamera and script trouble
How exactly are you doing this? Are you using the AttachCamera command?
Pain is only psychological.
-
- Posts: 335
- Joined: Sat Feb 09, 2008 5:47 pm
- Location: Lanzarote/Canary Islands/Spain
Re: FixedCamera and script trouble
No. Using EntityName in the fixedcamera entity.
But I managed to do it after a long time.
Problem is it doesn't use the Pawns yaw and pitch. I have to make it look at script points
But I managed to do it after a long time.
Problem is it doesn't use the Pawns yaw and pitch. I have to make it look at script points
Re: FixedCamera and script trouble
If you use a normal camera (not the FixedCamera stuff) you can use AttachCamera to attach the camera to a pawn and the camera will follow and rotate with the pawn.
Pain is only psychological.
-
- Posts: 335
- Joined: Sat Feb 09, 2008 5:47 pm
- Location: Lanzarote/Canary Islands/Spain
Re: FixedCamera and script trouble
But the pitch wont. That's why I'm using FixedCameras
Re: FixedCamera and script trouble
Ah, yes. You are correct. You could, however, use the TiltCamera command to modify the pitch of the camera. Requires a bit of work but should be doable.
Pain is only psychological.
Re: FixedCamera and script trouble
Here's a little sample script that makes the camera follow a pawn called 'target'. Also pitch-wise:
Note: The pawn you assign this script to must have actorrotation values of '0 180 0' in pawn.ini and the camera must be in first person mode.
Code: Select all
{
Spawn[ ()
{
Console(true);
Gravity(false);
LowLevel("setup");
} ]
setup[ ()
{
PawnRender(false);
AttachCamera();
yaw_speed = 10000;
SetTarget("target");
think = "run";
} ]
run[ ()
{
ThinkTime = 0;
TiltCamera(enemy_pitch + camera_pitch);
UpdateEnemyVis();
ideal_yaw = enemy_yaw;
ChangeYaw();
} ]
}
Pain is only psychological.
-
- Posts: 335
- Joined: Sat Feb 09, 2008 5:47 pm
- Location: Lanzarote/Canary Islands/Spain
Re: FixedCamera and script trouble
Wow. You're up for any challenge aren't you, Juutis?
The
enemy_pitch + camera_pitch
part is genius. I hadn't even thought about that. Wow.
The
enemy_pitch + camera_pitch
part is genius. I hadn't even thought about that. Wow.