QtCraft API C++ classes QML types Handbook

QcCapeDrive Struct

How a figure moves, as far as its cape cares: speeds in m/s in the figure's own frame. More...

Header: #include <clientcore/figures/QcCapeSwing.h>

Public Variables

double forwardSpeed
bool inWater
bool onGround
double sideSpeed
bool sneaking
double verticalSpeed

Static Public Members

QcCapeDrive from(const QcVec3 &velocity, double yaw, const QcEntityPose &pose)

Detailed Description

Member Function Documentation

[static] QcCapeDrive QcCapeDrive::from(const QcVec3 &velocity, double yaw, const QcEntityPose &pose)

Returns the drive of a figure moving with velocity in world space, facing yaw (degrees, 0 faces -Z, 90 faces +X), in pose.

Member Variable Documentation

double QcCapeDrive::forwardSpeed

Along the facing direction (negative when walking backwards).

bool QcCapeDrive::inWater

In water.

bool QcCapeDrive::onGround

Standing or walking on the ground.

double QcCapeDrive::sideSpeed

To the figure's right.

bool QcCapeDrive::sneaking

Sneaking.

double QcCapeDrive::verticalSpeed

Upwards (negative when falling).