Skip to content

ingame camera angle, pivot (center) and distance

hello all,

is there a way to get the coordinates of said three numbers so i can use them for my camera script. It would be a very long and boring way to not know what my camera settings are betwenn the toolset and the actual ingame cam!

Thanks many

Comments

  • NWN_TömlNWN_Töml Member Posts: 90
    Well..if nothing can be done ingame then i have to test it out... huh...what a fun :neutral:
  • squattingmonksquattingmonk Member Posts: 59
    There's no functions that will get the current camera data. One option would be to place a waypoint marking the location the camera should shoot from and calculate the angle and distance from there.

    Another option would be to use a debug function that cycles through settings until you see what looks good. Here's a script I cobbled together that would do just that for the camera direction. I attached it to the OnUsed event of a lever in my test area. You could do a similar script for the distance and pitch.

    void main() { int i; float fDirection, fDelay; string sDirection; object oPC = GetLastUsedBy(); AssignCommand(oPC, StoreCameraFacing()); for (i = 0; i < 360; i++) { fDirection = IntToFloat(i); fDelay = fDirection / 4; sDirection = FloatToString(fDirection); DelayCommand(fDelay, AssignCommand(oPC, SetCameraFacing(fDirection))); DelayCommand(fDelay, SendMessageToPC(oPC, "Camera direction: " + sDirection)); } fDelay += 5.0; DelayCommand(fDelay, AssignCommand(oPC, RestoreCameraFacing())); DelayCommand(fDelay, SendMessageToPC(oPC, "Restoring original camera...")); }
  • NWN_TömlNWN_Töml Member Posts: 90
    OH thank you very much. I will try that :)
Sign In or Register to comment.