vkmEngine 1.0.0
A C++ game engine · vkmengine.com
Loading...
Searching...
No Matches
Vkm::Engine::CharacterControllerSystem Class Reference

Drives every CharacterController's Rigidbody from its moveInput, and resolves what it stands on. More...

#include <character_controller_system.h>

Inheritance diagram for Vkm::Engine::CharacterControllerSystem:
Vkm::Engine::System

Public Member Functions

void fixedUpdate (FrameContext &ctx) override
 Execute this system at the fixed simulation rate.
bool isReplayed () const override
 Re-run during a replay: it moves the world from state and command, deterministically.
Public Member Functions inherited from Vkm::Engine::System
virtual void init (FrameContext &ctx)
 Called once after all systems are registered, before the first update.
virtual void shutdown ()
 Called once on engine shutdown.
virtual void update (FrameContext &ctx)
 Execute this system for the current frame.

Detailed Description

Drives every CharacterController's Rigidbody from its moveInput, and resolves what it stands on.

Runs on the tick, after PhysicsSystem, so it reads THIS tick's Rigidbody::supported / supportNormal / blockNormal. Writes velocity, never position. A target aimed into a wall is deflected along it here, or Coulomb friction would decide whether a character glides or snags.

Member Function Documentation

◆ fixedUpdate()

void Vkm::Engine::CharacterControllerSystem::fixedUpdate ( FrameContext & ctx)
overridevirtual

Execute this system at the fixed simulation rate.

Called 0+ times per frame; the step is ctx.clock.getFixedStep().

Runs before any producer stage, so ctx.visibility and ctx.ui are null here. ctx.poses is set by SkeletalAnimationSystem's own fixedUpdate, so a later Simulation system reads this tick's pose.

Parameters
ctxThis frame's services; see above for which products are set.

Reimplemented from Vkm::Engine::System.

◆ isReplayed()

bool Vkm::Engine::CharacterControllerSystem::isReplayed ( ) const
inlineoverridevirtual

Re-run during a replay: it moves the world from state and command, deterministically.

Returns
Always true.

Reimplemented from Vkm::Engine::System.


The documentation for this class was generated from the following file: