New Forums

Please go vote on the new forums now. Let's get this shipped.

You are here

need help with SetCameraHeight function

6 posts / 0 new
Last post
Foghopper
need help with SetCameraHeight function

How do i use this function to zoom the camera in at the start of a cutscene?

My script looks like this at the moment:

void main()
{
 
object oPC = GetEnteringObject();
 
if (!GetIsPC(oPC)) return;
 
SetCutsceneMode(oPC, TRUE);
 
SetCameraMode(oPC, CAMERA_MODE_CHASE_CAMERA);
 
AssignCommand(oPC, ActionMoveToObject(GetObjectByTag("WP_CS_ACTION")));
 
}

 

How do I add in that function to have the camera zoom in closer as well?

  • up
    50%
  • down
    50%
Tarot Redhand

Are you using the Gestalt Cutscene routines?

TR

  • up
    50%
  • down
    50%
Foghopper

No, I downloaded that and couldn't seem to get it to work.

  • up
    50%
  • down
    50%
TheBarbarian

I've fiddled around with this recently, running into the same problem. The solution turned out to be to delay the commands in the correct order.

SetCameraFacing -> SetCameraMode -> SetCameraHeight. 

        AssignCommand(oPC, SetCameraFacing(-1.0, 2.0, 65.0));
        DelayCommand(0.1, SetCameraMode(oPC, CAMERA_MODE_STIFF_CHASE_CAMERA));
        DelayCommand(0.1, LockCameraDistance(oPC));
        DelayCommand(0.2, SetCameraHeight(oPC, 0.1f));
^- ridiculous "foot-staring" camera height included for lulz and clearly seeing a difference.
  • up
    100%
  • down
    0%
Foghopper

Thanks for the replies. I've had another crack at the Gestalt system and managed to get it working this time. So i'll fiddle my way through working out how to use that now.

  • up
    50%
  • down
    50%
Foghopper

@TheBarbarian thanks for that. It's been a great help.

  • up
    100%
  • down
    0%