PP Motor

Name Type Description
AllowHorizontalMovement bool If set to true, movement along the direction related to the horizontal input axis is possible.
AllowJumping bool If set to true, the character can jump.
AllowLedgeClimbing bool If set to true, the character is allowed to climb ledges he previously grabbed.
AllowLedgeGrabbing bool If set to true, the character is allowed to hold on ledges.
AllowSideFlip bool If set to true, the character is allowed to perform side flips during a quick turnaround.
AllowVerticalMovement bool If set to true, movement along the direction related to the vertical input axis is possible.
AttackCooldown float The time in seconds the character has to wait between attacks.
AttackDamage int The damage inflicted to the target of the performed attack.
AttackForce float The force applied to the target of an attack in the direction of AttackForceVector. Assuming the AttackType is set to Throw, this value specifies the strength behind the throw.
AttackForceDirection Vector3 A vector in the character’s local coordinate system which defines the direction of the attack effect. Assuming the AttackType is set to Throw, this vector can be used as the throwing direction. The vector will be used normalized during runtime.
AttackRange float The range of the character’s attack in world units.
BackflipDirectionLocal Vector3 A vector in the character’s local coordinate system which defines the direction of the backflip jump. The vector will be used normalized during runtime.
BackflipForceMultiplier float The multipler applied to a normal jump’s JumpForce when the character performs a backflip jump. A backflip jump is performed out of crouching.
BodyContactForce float The force with which the touching rigidbody is pushed.
ColliderDividingAngle float The angle that divides the character collider into head and body parts. It is displayed in the scene as a red ray in character’s forward direction if Gizmos are turned on.
ContactDamage int The damage dealt to the collider touching/contacting the character.
CrouchSpeedMultiplier float The multiplier for calculating the crouching speed. ResultingSpeed = RunSpeed * CrouchSpeedMultiplier.
DamageOnBodyContact bool If set to true, other colliders take damage when touching this character’s collider.
DieOnHeadCollision bool If set to true, the character dies when hit on the head. The division of the collider into body and head is defined by the ColliderDividingAngle.
DirectInput bool If set to true, the controller input is always and directly used to determine the new movement direction of the character. Could lead to side effects depending on the camera setup. Use only if you know what you are doing (see demo 3 for an example).
DoubleJumpForceMultiplier float The multipler applied to a normal jump’s JumpForce when the character performs a double jump. A double jump can also be performed while standing.
GroundedCheckRayLength float The length of the ray which checks if the character is grounded or not.
JumpForce float The force behind a normal character jump.
LedgeClimbingSpeed float The time the character needs to pull himself up and climbing the ledge.
LedgeGrabHeight float The character height where a ledge should be grabbed. Depends on the character transform’s position.
LedgeGrabRange float The range in forward/diagonal direction in which ledge grabs can happen.
LedgeMaxAngle float The maximum angle of a ledge to be considered for ledge grabbing.
LongJumpDirectionLocal Vector3 A vector in the character’s local coordinate system which defines the direction of the long jump. The vector will be used normalized during runtime.
LongJumpMultiplier float The multipler applied to a normal jump’s JumpForce when the character performs a long jump. A long jump can only be performed during crouching while still in fast forward motion. Otherwise, a backflip will be performed.
MaxTurningDegreesGrounded float The maximum degrees the character can rotate per FixedUpdate call while grounded. Represents more or less the rotation speed when grounded.
MaxTurningDegreesOrbit float The maximum degrees the character rotates per FixedUpdate call while floating. Represents more or less the rotation speed when in orbit.
MaxTurningDegreesPlanetChange float The maximum degrees the character rotates per FixedUpdate call while changing/flying to another planet. Represents more or less the rotation speed when midair between two separate planets or gravitational fields.
MidAirCorrectionSpeed float The speed of the movement while floating.
MovementDirChangeSmoothTime float The time in seconds the character needs to turn into a new movement direction.
MovementStartSmoothTime float The time in seconds until the character starts to move after standing still.
PlanetNormalSmoothTime float The smoothing of ground normals when walking over a planet or platform. The greater the value, the smoother the character’s adjustment to terrain changes. Small values can lead to a jittering character pose when moving over unsteady grounds.
QuickTurnaroundDuration float The duration of a quick turnaround, e.g. for limitting the time for a side flip.
RunSpeed float The normal movement speed of the character.
SideFlipForceMultiplier float The multipler applied to a normal jump’s JumpForce when the character performs a side flip. A side flip can only be performed while performing a quick turnaround.
StickToSurface bool If set to true, the character aligns with the planet surface, otherwise with the gravitational field lines. Only applies when the character is grounded.
TimeForConsecutiveJump float The time between landing and the next jump to be counted as a consecutive jump. A jump within this time frame triggers a double or triple jump.
TripleJumpForceMultiplier float The multipler applied to a normal jump’s JumpForce when the character performs a triple jump. A triple jump can only be performed immediately after a double jump and when in forward motion.
UseJumpForceAsHeight bool If set to true, the value stored in JumpForce will be the reached height of a normal jump.

PP Engine Object

This MonoBehaviour comprises all methods needed for leveraging the physics engine of this asset. Just extend this class (like the PPMotor or SimpleObject does) and you will have all the physics methods you need.

Name Type Description
LostInSpaceTimeThreshold float The time after which the object is considered to be lost in space because no planet was in range.
OrbitDragDelay float The time in seconds after which the orbit drag kicks in.
OrbitDragIncrease float The maximum drag increase applied to the attached Rigidbody while in orbit, i.e. Rigidbody.drag + OrbitDragIncrease. The increase will star to build up after the OrbitDragDelay.

Gravitational Field

Name Type Description
FieldColor Color The color of the drawn field when ShowField is set to true.
FieldLinesColor Color The color of the drawn field lines when ShowFieldLines is set to true.
Gravity float The force of gravity of this field.
GravityPriority int The priority of this gravitational field. A higher value represents a higher priority when competing with other gravitational fields.
NumberOfLines int The number of drawn field lines when ShowFieldLines is set to true.
ShowField bool If set to true, the area affected by the field will be drawn in the scene (assuming Gizmos are turned on).
ShowFieldLines bool If set to true, rays will be drawn in the scene along the field lines of the field (assuming Gizmos are turned on).

Gravitational Field – Uniform

Name Type Description
InvertOrbitCharacterUp bool If set to true, the affected object’s up should be aligned with the field line direction.

Gravitational Field – Capsule

Name Type Description
DisableCapFields bool If set to true, the radial fields at both ends of the capsule collider should be disabled.

PP Camera

Name Type Description
CameraSettings CameraSettings Reference to the currently active camera settings.
SecondsToTransition float The time in seconds needed for transitioning from the current to a new camera setting.
TransitionRotationDelay float The delay in seconds after the camera starts to rotate to a new camera setting.
UsedCamera Camera Reference to the camera object used by the script. If no camera is assigned to this variable, the scene’s main camera will be assigned at runtime.

Camera Settings

Name Type Description
CameraBehavior CameraBehavior Determines how the camera reacts to character movements in terms of own positioning and rotation.
CopyCamCompValues bool If set to true, the values of the camera component assigned to the camera settings object are copied to the currently used camera (main camera).
Distance float The distance at which the camera follows the character.
Smoothness float The smoothness of the camera positioning in seconds. A greater value results in a slower but smoother camera movement.
CameraViewDirection (Follow2_5D) float The distance at which the camera follows the character. Needed by camera behaviors Follow*.
AxisOffset (FollowCylindrical) float The offset along (up or down) the rotation axis. Needed by camera behaviors FollowCylindrical.
ReferenceObject (FollowCylindrical and Static3D*) GameObject The game object whose axis is used as a reference for pivoting the camera. Needed by camera behaviors FollowCylindrical.
UsedAxisForRotation (FollowCylindrical) Axis The axis of the reference object which should be taken as the rotation axis for the camera. Needed by camera behaviors FollowCylindrical.
MinDistance (FollowLookAtCharacter) float The minimum distance the camera will keep to the followed character. Needed by camera behavior FollowLookAtCharacter.
MinHeight (FollowLookAtCharacter) float The minimum height relative to the character the camera will keep. Needed by camera behavior FollowLookAtCharacter.
StickToWorldUpAxis (FollowLookAtCharacter) bool If set to true, the camera aligns with the world’s Y axis when looking at the character. Needed by camera behavior FollowLookAtCharacter.

PP NPC AI

Name Type Description
FieldOfViewAngle float The NPC’s field of view (cone in front of the NPC). Max value is 90.0f.
FlightDuration float How many seconds the NPC should flee.
FollowDistance float The maximum distance held to the target while following it.
KeepTarget bool If set to true, the current target of the NPC will be kept even it is out of range/sight.
PatrolFrom Transform Patrolling starting point if NpcIdleBehavior is set to Patrol.
PatrolTo Transform Patrolling endpoint if NpcIdleBehavior is set to Patrol.
NpcIdleBehavior NpcIdleBehavior Defines how the NPC behaves when idle, i.e. if it does not have a target.
NpcReaction NpcReaction Defines how the NPC reacts when spotting a target, i.e. Target != null.
Target Transform The current target of the NPC.