GitXplorerGitXplorer
Y

ProjectBeta

public
0 stars
0 forks
0 issues

Commits

List of commits on branch master.
Verified
d2592107f133d2e4dacb4adbcddde5ca6ae2ffea

Create README.md

YYegorStepanov committed 2 years ago
Unverified
a05b5bf642697e806fc32c37ca66bf3b9e4fb8be

Implement the character controller

YYegorStepanov committed 2 years ago
Unverified
8f47b45454ecf4866c936bc309abfd42d9458608

Update rider package

YYegorStepanov committed 2 years ago
Unverified
9be0067fc529ff664bc071f58c7689bb77e2254e

Init empty 3D project

YYegorStepanov committed 2 years ago

README

The README file for this repository.

ProjectBeta

Demo

Rotating on slopes

Rotating on slopes

Jumping

Movie_005

Climbing the stars

Movie_004

Architecture

The Player reads the input and passes it to the CharacterController. CharacterController implements the ICharacterController interface. When these methods are called, depending on the current state, the features are called in the correct and explicit order.

Important Notes

  • ICharacterController is an interfrace from the low-level Kinematic Character Controller package. Its engine calls the implemented methods (UpdateRotation, BeforeCharacterUpdate, etc) when needed.
  • Feature is an encapsulated logic of CharacterController: MovementFeature, JumpingFeature etc.

Example

public void UpdateVelocity(ref Vector3 currentVelocity, float deltaTime)
{
    switch (CurrentState)
    {
        case CharacterState.Default:
            _movementFeature.UpdateVelocity(ref currentVelocity, deltaTime);
            _jumpingFeature.UpdateVelocity(ref currentVelocity, deltaTime);
            _gravityFeature.UpdateVelocity(ref currentVelocity, deltaTime);
            _dragFeature.UpdateVelocity(ref currentVelocity, deltaTime);
            _externalForceFeature.UpdateVelocity(ref currentVelocity, deltaTime);
            break;
        case CharacterState.Charging:
            _chargingFeature.UpdateVelocity(ref currentVelocity, deltaTime);
            break;
        case CharacterState.NoClip:
            _noClipFeature.UpdateVelocity(ref currentVelocity, deltaTime);
            break;
        default:
            break;
    }
}

Settings

image

image