![]() |
VR Interaction Framework v2.0
|
The BNGPlayerController handles basic player movement. More...
Public Member Functions | |
virtual void | CheckPlayerElevationRespawn () |
Check if the player has moved beyond the specified min / max elevation Player should never go above or below 6000 units as physics can start to jitter due to floating point precision Maybe they clipped through a floor, touched a set "lava" height, etc. | |
virtual void | UpdateDistanceFromGround () |
virtual void | RotateTrackingSpaceToCamera () |
virtual void | UpdateCameraRigPosition () |
virtual void | UpdateCharacterHeight () |
virtual void | UpdateCameraHeight () |
virtual void | CheckCharacterCollisionMove () |
Move the character controller to new camera position. | |
virtual void | CheckRigidbodyCapsuleMove (Vector3 movePosition) |
virtual bool | IsGrounded () |
virtual void | OnClimbingChange () |
Public Attributes | |
bool | MoveCharacterWithCamera = true |
bool | RotateCharacterWithCamera = true |
bool | ResizeCharacterHeightWithCamera = true |
Transform | TrackingSpace |
Transform | CameraRig |
Transform | CenterEyeAnchor |
LayerMask | GroundedLayers |
float | DistanceFromGround = 0 |
0 means we are grounded | |
float | DistanceFromGroundOffset = 0 |
float | MinimumCapsuleHeight = 0.4f |
Minimum Height our Player's capsule collider can be (in meters) | |
float | MaximumCapsuleHeight = 3f |
Maximum Height our Player's capsule collider can be (in meters) | |
float | LastTeleportTime |
float | CharacterControllerYOffset = -0.025f |
Offset the height of the CharacterController by this amount. | |
float | CameraHeight |
Height of our camera in local coords. | |
bool | ElevateCameraIfNoHMDPresent = true |
float | ElevateCameraHeight = 1.65f |
float | MinElevation = -6000f |
If player goes below this elevation they will be reset to their initial starting position. If the player goes too far away from the center they may start to jitter due to floating point precisions. Can also use this to detect if player somehow fell through a floor. Or if the "floor is lava". | |
float | MaxElevation = 6000f |
If player goes above this elevation they will be reset to their initial starting position. If the player goes too far away from the center they may start to jitter due to floating point precisions. | |
float | LastPlayerMoveTime |
RaycastHit | groundHit |
float | SphereColliderRadius = 0.08f |
Protected Attributes | |
CharacterController | characterController |
Rigidbody | playerRigid |
CapsuleCollider | playerCapsule |
SmoothLocomotion | smoothLocomotion |
PlayerClimbing | playerClimbing |
bool | isClimbing |
bool | wasClimbing = false |
RaycastHit | hit |
Transform | mainCamera |
The BNGPlayerController handles basic player movement.
|
virtual |
Move the character controller to new camera position.
|
virtual |
Check if the player has moved beyond the specified min / max elevation Player should never go above or below 6000 units as physics can start to jitter due to floating point precision Maybe they clipped through a floor, touched a set "lava" height, etc.
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
float BNG.BNGPlayerController.CameraHeight |
Height of our camera in local coords.
Transform BNG.BNGPlayerController.CameraRig |
Transform BNG.BNGPlayerController.CenterEyeAnchor |
|
protected |
float BNG.BNGPlayerController.CharacterControllerYOffset = -0.025f |
Offset the height of the CharacterController by this amount.
float BNG.BNGPlayerController.DistanceFromGround = 0 |
0 means we are grounded
float BNG.BNGPlayerController.DistanceFromGroundOffset = 0 |
float BNG.BNGPlayerController.ElevateCameraHeight = 1.65f |
bool BNG.BNGPlayerController.ElevateCameraIfNoHMDPresent = true |
LayerMask BNG.BNGPlayerController.GroundedLayers |
RaycastHit BNG.BNGPlayerController.groundHit |
|
protected |
|
protected |
float BNG.BNGPlayerController.LastPlayerMoveTime |
float BNG.BNGPlayerController.LastTeleportTime |
|
protected |
float BNG.BNGPlayerController.MaxElevation = 6000f |
If player goes above this elevation they will be reset to their initial starting position. If the player goes too far away from the center they may start to jitter due to floating point precisions.
float BNG.BNGPlayerController.MaximumCapsuleHeight = 3f |
Maximum Height our Player's capsule collider can be (in meters)
float BNG.BNGPlayerController.MinElevation = -6000f |
If player goes below this elevation they will be reset to their initial starting position. If the player goes too far away from the center they may start to jitter due to floating point precisions. Can also use this to detect if player somehow fell through a floor. Or if the "floor is lava".
float BNG.BNGPlayerController.MinimumCapsuleHeight = 0.4f |
Minimum Height our Player's capsule collider can be (in meters)
bool BNG.BNGPlayerController.MoveCharacterWithCamera = true |
|
protected |
|
protected |
|
protected |
bool BNG.BNGPlayerController.ResizeCharacterHeightWithCamera = true |
bool BNG.BNGPlayerController.RotateCharacterWithCamera = true |
|
protected |
float BNG.BNGPlayerController.SphereColliderRadius = 0.08f |
Transform BNG.BNGPlayerController.TrackingSpace |
|
protected |