QtCraft API C++ classes QML types Handbook

QcRaycastHit Struct

The block a ray hit (QcRaycast::cast). More...

Header: #include <common/physics/QcRaycast.h>

Public Variables

QcBlockPos block
double distance
QcBlockFace face
QcVec3 point

Detailed Description

Member Variable Documentation

QcBlockPos QcRaycastHit::block

The block hit.

double QcRaycastHit::distance

Distance along the ray to the hit.

QcBlockFace QcRaycastHit::face

Face through which the ray entered the block; the block placed against it goes to its neighbour.

QcVec3 QcRaycastHit::point

Where the ray meets the block's box, in world space.