Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

Implements

Index

Methods

Properties

Constructors

Methods

  • abortJump(): void
  • activate(enable: boolean): void
  • activated(): boolean
  • canJump(): boolean
  • doBeforePhysicsStep(timeDelta: number): void
  • enableSynchronization(enable: boolean): void
  • getCurrentFallSpeed(): number
  • getCurrentForwardSpeed(): number
  • getCurrentJumpSpeed(): number
  • getCurrentSidewaysSpeed(): number
  • getForwardAcceleration(): number
  • getForwardAngle(): number
  • getForwardDeceleration(): number
  • getForwardSpeedMax(): number
  • getGravity(): number
  • getJumpSpeed(): number
  • getJumpSpeedToReach(jumpHeight: number): number
  • getJumpSustainTime(): number
  • getMaxFallingSpeed(): number
  • getName(): string
  • getNameId(): number
  • getPhysics3D(): Physics3D
  • getPhysicsPosition(result: RVec3): RVec3
  • getSidewaysAcceleration(): number
  • getSidewaysDeceleration(): number
  • getSidewaysSpeedMax(): number
  • getSlopeMaxAngle(): number
  • getStickAngle(): number
  • getStickForce(): number
  • isFalling(): boolean
  • Check if the Character is "going down", either because it's in the falling state or because it's jumping but reached the jump peak and is now going down (because the jump speed can't compensate anymore the falling speed).

    If you want to check if the object is falling outside of a jump (or because the jump is entirely finished and there is no jump speed applied to the object anymore), consider using isFallingWithoutJumping.

    Returns boolean

    Returns true if it is "going down" and false if not.

  • isFallingWithoutJumping(): boolean
  • isForwardAngleAround(degreeAngle: number, tolerance: number): boolean
  • isJumping(): boolean
  • isMovingEvenALittle(): boolean
  • isOnFloor(): boolean
  • isSyncedOverNetwork(): boolean
  • moveObjectToPhysicsPosition(physicsPosition: RVec3): void
  • onActivate(): void
  • onCreated(): void
  • onDeActivate(): void
  • onDestroy(): void
  • onObjectHotReloaded(): void
  • setCanJump(): void
  • setCanNotAirJump(): void
  • setCurrentFallSpeed(currentFallSpeed: number): void
  • setCurrentForwardSpeed(currentForwardSpeed: number): void
  • setCurrentJumpSpeed(currentJumpSpeed: number): void
  • setCurrentSidewaysSpeed(currentSidewaysSpeed: number): void
  • setForwardAcceleration(forwardAcceleration: number): void
  • setForwardAngle(angle: number): void
  • setForwardDeceleration(forwardDeceleration: number): void
  • setForwardSpeedMax(forwardSpeedMax: number): void
  • setGravity(gravity: number): void
  • setJumpSpeed(jumpSpeed: number): void
  • setJumpSustainTime(jumpSustainTime: number): void
  • setMaxFallingSpeed(maxFallingSpeed: number, tryToPreserveAirSpeed?: boolean): void
  • setShouldBindObjectAndForwardAngle(shouldBindObjectAndForwardAngle: boolean): void
  • setSidewaysAcceleration(sidewaysAcceleration: number): void
  • setSidewaysDeceleration(sidewaysDeceleration: number): void
  • setSidewaysSpeedMax(sidewaysSpeedMax: number): void
  • setSlopeMaxAngle(slopeMaxAngle: number): void
  • shouldBindObjectAndForwardAngle(): boolean
  • simulateBackwardKey(): void
  • simulateForwardKey(): void
  • simulateJumpKey(): void
  • simulateLeftKey(): void
  • simulateRightKey(): void
  • simulateStick(stickAngle: number, stickForce: number): void
  • updateFromBehaviorData(oldBehaviorData: any, newBehaviorData: any): boolean
  • usesLifecycleFunction(): boolean
  • Should return false if the behavior does not need any lifecycle function to be called. Default, hidden, "capability" behaviors set it to false. This avoids useless calls to empty lifecycle functions, which would waste CPU time (and have a sizeable impact for example when lots of static instances are living in the scene).

    Returns boolean

  • wasBackwardKeyPressed(): boolean
  • wasForwardKeyPressed(): boolean
  • wasJumpKeyPressed(): boolean
  • wasLeftKeyPressed(): boolean
  • wasRightKeyPressed(): boolean
  • wasStickUsed(): boolean
  • getAcceleratedSpeed(currentSpeed: number, targetedSpeed: number, speedMax: number, acceleration: number, deceleration: number, timeDelta: number): number
  • getVec3(x: number, y: number, z: number): Vec3
  • updateCharacterSpeedFromInputs(timeDelta: number): void

Properties

character: null | CharacterVirtual = null
name: string
type: string
epsilon: number = ...

A very small value compare to 1 pixel, yet very huge compare to rounding errors.

Constructors

Generated using TypeDoc