Camera Pawn script -zoom in and out

Topics regarding Scripting with Reality Factory
Post Reply
Veleran
Posts: 898
Joined: Mon Aug 22, 2005 10:22 am
Location: Greece

Camera Pawn script -zoom in and out

Post by Veleran »

I am thinking a script for a Pawn to attach a fixed camera on it,but can not syntax the commands.
Until then i am using the isometric camera but can not zoom in and out.
1.Press Key + and it moves 32 texels (for example-have nt tested this value yet) towards player
2.Press - then it moves away -32 units.
3.Check if the camera pawn is very close or far from the player : min 128 max 448 texels.
4.Check the player's height and use the 75% of it to calculate how high above the player to place the camera pawn.
5.Reset camera by pressing another key like * in case the camera pawn has lost its relative position

I found these low level Commands :
Calculate Height Y
GetBoneToBone(string BoneName, string TargetEntityName, string TargetBoneName);
Percent int

IsKeyDown(int Key#);
-----
for the reset camera

float DistanceBetweenEntities(string FromEntityName, string ToEntityName, bool IgnoreY);
Returns the distance between 2 entities (Pawn, StaticEntityProxy, Attribute, Player). If the flag IgnoreY is present and true the Y-distance will be ignored. For the player use "Player" as one of the entity names.

Take your time,i am hoping to avoid huge bugs
Post Reply