Home   Help Search Login Register  

Author Topic: Defining Tactical View - 1st /3rd person  (Read 2725 times)

0 Members and 1 Guest are viewing this topic.

Offline Delta

  • Members
  • *
  • Shazayme, Babye !
Defining Tactical View - 1st /3rd person
« on: 28 Oct 2007, 00:46:53 »
Hello all,

       I've got quite a pickle  >:(

  How can the tactical view be defined ingame?
Say a player is in 1st person mode, how can this be identified if at all?

Yours,

SSD

Offline Mandoble

  • Former Staff
  • ****
    • Grunt ONE and MandoMissile suite
Re: Defining Tactical View - 1st /3rd person
« Reply #1 on: 28 Oct 2007, 01:47:03 »
Try the following with first person, third person or any other camera combination. The distance might indicate which camera view is in use.
Code: [Select]
_wpos = positionCameraToWorld [0,0,0];hint format["DST: %1", vehicle player distance _wpos];

Offline JasonO

  • OFPEC Patron
  • ****
  • Oh no...
    • The New Life RPG
Re: Defining Tactical View - 1st /3rd person
« Reply #2 on: 02 Nov 2007, 12:25:32 »
Yep it does. For me 3rd person distance is above 4. When in 1st Person its around 1.55-1.70. When running the distance changes.

I think if you presume that anything above 4 is 3rd person. Anything else and its 1st.

When I got into a hummer 1st person distance changed to 1.35 and 3rd person was 9.8

I would presume the number is different for different vehicles as each one has a selection defining where the view point is I believe.

Offline h-

  • OFPEC Site
  • Administrator
  • *****
  • Formerly HateR_Kint
    • OFPEC
Re: Defining Tactical View - 1st /3rd person
« Reply #3 on: 03 Nov 2007, 00:02:36 »
You're right.
And also things blocking the camera; steep hills and so on screw up the distance..
Project MCAR   ---   Northern Fronts   ---   Emitter 3Ditor
INFORMATIVE THREAD TITLES PLEASE. "PLEASE HELP" IS NOT ONE..
Chuck Norris can divide by zero.

Offline Planck

  • Honoured
  • Former Staff
  • ****
  • I'm never wrong ....I'm just not always right !
Re: Defining Tactical View - 1st /3rd person
« Reply #4 on: 03 Nov 2007, 02:40:33 »
This might be of interest, a complete list of external camera positions for different vehicle classes.

Code: [Select]
All
extCameraPosition[] = {0,2,-20};
Car
extCameraPosition[] = {0,1,-10};
MotorCycle
extCameraPosition[] = {0,1,-10};
MotorCycle/M1030
extCameraPosition[] = {0,0,-3};
MotorCycle/TT650
extCameraPosition[] = {0,0,-3};
Tank
extCameraPosition[] = {0,1.5,-9};
Man
extCameraPosition[] = {0,1,-3.5};
Plane
extCameraPosition[] = {0,1.4,-25};
Plane/Camel
extCameraPosition[] = {0,1.2,-13};
Helicopter/AH6
extCameraPosition[] = {0,2,-15};
Boat/RHIB
extCameraPosition[] = {0,4,-14};
Boat/Zodiac
extCameraPosition[] = {0,1.5,-4};
Boat/PBX
extCameraPosition[] = {0,4,-14};

I believe the format is X,Z,Y as opposed to X,Y,Z


Planck
I know a little about a lot, and a lot about a little.

Offline Baddo

  • Former Staff
  • ****
  • Reservist Jaeger
Re: Defining Tactical View - 1st /3rd person
« Reply #5 on: 05 Nov 2007, 21:11:54 »
From Official OFP ComRef:

Quote
Name: Position
Format: [x,z] or [x,z,y]
Description: Position, x coordinates is east-west, z is south-north, y is height above ground, default y is 0.

Terrain is plotted to the xz-plane.

So I think the positions you pasted are actually [x,y,z]. Even BIS can't decide... also in mission.sqm [x,y,z] is used so that y is the height. Positions of objects copied from mission.sqm's:

OFP: position[]={6638.557129,44.685791,7217.083984};
ArmA: position[]={12432.091797,60.514584,17426.423828};

For example,

MotorCycle
   extCameraPosition[] = {0,1,-10};

means that the external camera position is, relatively to the x, y and z axis of the model, 0 in x, +1 in y, and -10 in z direction. -10 in z direction would mean that the camera is 10 meters behind the motorcycle model's origin (or behind whatever reference point used by BIS).

The model's reference point, the origin, is not necessarily the origin you decided in a 3D-editing program. That can be wrong. So the origin is probably a "corrected" origin point (The game engine determines the correct geometrical origin of the model during run-time if you set some setting in the config?). The origin of the 3D model file is not necessarily in the geometrical center point of the model, depends on the modeller.

...so much for consistency! :)
« Last Edit: 05 Nov 2007, 21:27:12 by Baddo »

Offline Planck

  • Honoured
  • Former Staff
  • ****
  • I'm never wrong ....I'm just not always right !
Re: Defining Tactical View - 1st /3rd person
« Reply #6 on: 05 Nov 2007, 21:51:56 »
No it is in fact:

extCameraPosition[] = {0,1,-10};

0 on the x axis
1m above the model in height
10m behind the model on the y axis


Planck
I know a little about a lot, and a lot about a little.

Offline Baddo

  • Former Staff
  • ****
  • Reservist Jaeger
Re: Defining Tactical View - 1st /3rd person
« Reply #7 on: 06 Nov 2007, 16:57:43 »
But the y axis is actually the height! It follows the standard Microsoft Direct3D left-handed Cartesian coordinate system's way of naming the axis.

http://msdn.microsoft.com/archive/en-us/directx9_m/directx/direct3d/gettingstarted/3dcoordinatesystems/coordinatesystems.asp?frame=true



BIS just has not been consistent regarding in what order they put them: [x,y,z] or [x,z,y]. The latter form is written into the Official OFP ComRef, and also works like that if you use setPos and friends, y being height.

Actually, it doesn't matter how we call the axis, like [cat,dog,goose], as long as everyone knows what is the agreement :) I blame BIS for not being consistent and for not publishing good, explicit documentation.