cubos::engine::Rotation struct

Component which assigns a rotation to an entity.

Public static functions

static auto lookingAt(glm::vec3 direction, glm::vec3 up = {0.0F, 1.0F, 0.0F}) -> Rotation
Returns a rotation component looking at the given direction.

Public variables

glm::quat quat
Rotation of the entity.

Function documentation

static Rotation cubos::engine::Rotation::lookingAt(glm::vec3 direction, glm::vec3 up = {0.0F, 1.0F, 0.0F})

Returns a rotation component looking at the given direction.

Parameters
direction Direction to look at.
up Up vector.
Returns Rotation component.