Camera

From Serious Sam Wiki
Jump to: navigation, search
Editor model of CAnimatedCameraEntity.

General information

Class: CAnimatedCameraEntity

The Camera is used for static and animated cut sequences. Activating a Camera requires a Script.

Properties

Anim name (IDENT)

To do: Add description


Envelope name suffix (CString)
SEd3.5 or higher

Defines a suffix for the envelope names of the Camera


Info 16x16.png Note: This is useful when applying an animation configuration with envelopes for more than just one entity.
Relative path (BOOL)

Defines whether position and rotation data is interpreted in relation to the World Spawn or in relation to the position and orientation of the Camera.


Info 16x16.png Note: For static use of the Camera this value should be set to false; for animated use of the Camera this value should be set to true.
Locked view 'Target' (BOOL)

Defines whether the Camera uses the Target Envelope in animations for purposes of rotation.


Default FOV [deg] (FLOAT)

Defines the default Field Of View of the Camera in degrees. Is overridden by FOV values in the corresponding animations channel.


Default focus distance (FLOAT)

Defines the default focus distance of the Camera in meters. Is overridden by focus distance values in the corresponding animations channel.


Info 16x16.png Note: For this property to have an effect the DoF aperture value of the Post processing effect property (see below) must be greater than 0.
Default aspect (FLOAT)

Defines the default aspect ratio of the Camera by representing the fraction (width / height). Is overridden by aspect values in the corresponding animations channel.


HPB shake amplitude (Vector3f)
SEd3.5 or higher

Defines a random rotation of the Camera. Values represent the maximum degree the Camera will rotate around its original orientation in static use as well as in animated use.


Shake speed (FLOAT)
SEd3.5 or higher

Defines the speed of the above random rotation [units?]. Is overridden by shake speed values in the corresponding animations channel.


Post processing preset (CPostProcessingPreset)

Defines the values of a post processing preset that is applied to the world during use of the Camera.


Animated post processing presets (CAnimatedPostProcessChannel)
SEd3.5 or higher

Defines channel name and post processing preset values that can be changed during animation through envelope channels.


Anim configuration (CAnimEntityConfiguration)

Defines the values of an animation configuration for the Camera.


Info 16x16.png Note: Animation configurations are best created in the Animation Editor.
Use parent's orientation (BOOL)

Defines if the Camera uses the orientation of its parent.


Info 16x16.png Note: If the Camera and its parent do not have the same Origin the Camera will rotate around its parent.
SEd3.0 only

To do: Add description


Looping (BOOL)
SEd3.5 or higher

Defines if an animation is looped.


Warning 16x16.png Warning: If this value is set to true and user breaks are disabled via script function animations must be stopped manually in script.
Default projection type (ENUM)
SEd4.0 only

Defines if the camera uses 'Perspective' or 'Orthographic' projection.


Bug.jpg Bug: Orthographic projection appears to be non-functional.
Ortho cam width (FLOAT)
SEd4.0 only

Defines the width of the orthographic projection in meters.


Ortho cam height (FLOAT)
SEd4.0 only

Defines the height of the orthographic projection in meters.


Overlay fading (Bool)
SEd4.0 only

To do: Add description


Remote camera viewer (CRemoteCameraViewerProperties)
SEd4.0 only

Defines the values of a remote camera viewer for the Camera.


Canvas size (Vector2l)
SEd4.0 only

To do: Add description


Spawn flags (LFLAGS)

Defines in which difficulty levels and game types the Camera is spawned.


Name (CString)

Defines the name of the Camera.


Defines a entity pointer to the parent of the Camera.


Platforms (LFLAGS)

Defines on which platforms the Camera is spawned.


Entity ID (ULONG)

Displays the entity ID of the Camera.


Info 16x16.png Note: Entity ID cannot be edited.

Script Functions

Methods

CAnimatedCameraEntity Methods
Name Parameters Return Data Type Description
Name Data Type
AddAnimation
SEd4.0 only
AnimName IDENT void Adds an animation to the Camera.
DisableUserBreak - void Disables the the user to stop a Camera animation cutscene.
EnableUserBreak - void Enables the user to stop a Camera animation cutscene.
GetAnimationLength AnimName IDENT FLOAT Returns length of given anmimation in FLOAT format.
GetDefaultFOV
SEd4.0 only
- FLOAT Returns the default FOV setting in degrees.
GetDefaultPlacement - QuatVect Returns default position and orientation of the Camera in QuatVect format.
LastAnimationWasInterrupted - BOOL Returns 1 if the last Camera animation was interrupted.
PlayAnimWait AnimName IDENT LatentFuncID Starts Camera with specified animation and waits until animation is finished.
SetCurrent - void Sets current Camera.
SetDefaultPlacement Default QuatVect void Sets default position and orientation of the Camera to the specied QuatVect values.
StartWait AutoStopTime FLOAT void Activates the Camera and stops it after specified amount of seconds.
Stop - void Stops the camera.
CCameraEntity Methods
Name Parameters Return Data Type Description
Name Data Type
GetTanFOV - FLOAT Returns tangent of the half of FOV angle which is really used by the camera when setting up the projection matrix.
MouseHitTest *pas IArgumentStack void Performs a raycast from current screen space coordinates into the scene and retrieves hit entity, hull, and position. For more information see Mouse Hit Test.
CBaseEntity Methods
Name Parameters Return Data Type Description
Name Data Type
ApplyDamageTool
SEd3.5 or higher
DamageSource CString void To do: Add description
DamageType CString
WeaponIndex WeaponIndex
CharacterClass IDENT
Damage SLONG
EnableReceiveDamageScriptEvent
SEd3.5 or higher
- void Enables ReceiveDamage script events (see below).
Warning 16x16.png Warning: This function disables native damage handling.
EnableTouchAutoMoveTarget
SEd4.0 only
Enabled BOOL void Enables the entity to become an auto move target.
GetAngularVelocity - Vector3f Returns angular velocity of the entity in Vector3f format.
GetAttachmentAbsolutePlacement Attachment IDENT QuatVect Returns placement of attachment in relation to World Spawn in QuatVect format.
GetAttachmentRelativePlacement Attachment IDENT QuatVect Returns placement of attachment in relation to entity in QuatVect format.
GetClassName
SEd3.5 or higher
- CString Returns classname in CString format.
GetLinearVelocity - Vector3f Returns linear velocity of entity in Vector3f format.
GetName - CString Returns the name of the entity in CString format.
GetParent Name IDENT Handle Returns a CBaseEntity handle of the parent of the entity.
GetPlacement - QuatVect Returns position and orientation of the entity in QuatVect format.
GetWorld
SEd3.5 or higher
- CWorld* To do: Add description
GetWorldInfo
SEd3.5 or higher
- CWorldInfoEntity* To do: Add description
InflictDamage Amount SLONG void Inflicts damage to entity.
InflictDamageOfType Amount SLONG void Inflicts damage of a specified damage type to entity.
DamageType CString
InflictDamageToTarget
SEd3.5 or higher
Target Handle void To do: Add description
Amount SLONG
Weapon IDENT
DamageType CString
InflictWeaponDamage
SEd3.5 only
Amount SLONG void To do: Add description
Weapon IDENT
DamageType CString
IsDestroyed - BOOL Returns 1 if entity is destroyed.
IsReceiveDamageScriptEventEnabled
SEd3.5 or higher
- BOOL Returns 1 if ReceiveDamageScriptEvent is enabled (see above).
SetAngularVelocity AngVelocity Vector3f void Sets angular velocity of entity to the specified Vector3f value.
SetLinearVelocity Velocity Vector3f void Sets the velocity of the entity to the specifed Vector3f values.
SetPlacement Placement QuatVect void Sets position and orientation of the entity to the specified QuatVect values.

Events

AnimationFinished
Triggers when an animation of the Camera finishes.
Destroyed
Triggers when the Camera is destroyed.
EntityDeleted → SEd3.5 or higher
Triggers when the Camera is deleted.
ReceiveDamage → SEd3.5 or higher
Triggers when the Camera receives damage.
Info 16x16.png Note: This event requires enabling via EnableReceiveDamageScriptEvent method.
UserBreak
Triggers when an animation of the Camera is interrupted by the player.

Other Information

To do: Add info if appropriate.

Related Pages and Links

To do: Add appropriate links.