group2 0.1.0
CSE 125 Group 2
Loading...
Searching...
No Matches
PreviousPosition Struct Reference

Copy of Position from the previous physics tick, used for render interpolation. More...

#include <PreviousPosition.hpp>

Public Attributes

glm::vec3 value {0.0f, 0.0f, 0.0f}
 World-space position from the previous tick.
 

Detailed Description

Copy of Position from the previous physics tick, used for render interpolation.

Written by the game loop immediately before each physics step:

registry.get<PreviousPosition>(e).value = registry.get<Position>(e).value;
World-space position of an entity, in game units.
Definition Position.hpp:10
glm::vec3 value
XYZ position (Y-up, Quake units).
Definition Position.hpp:11
Copy of Position from the previous physics tick, used for render interpolation.
Definition PreviousPosition.hpp:22
glm::vec3 value
World-space position from the previous tick.
Definition PreviousPosition.hpp:23

Read by the renderer to interpolate between ticks:

renderPos = glm::mix(prev.value, cur.value, alpha);
Note
Only the client needs this component. The server has no renderer.

Member Data Documentation

◆ value

glm::vec3 PreviousPosition::value {0.0f, 0.0f, 0.0f}

World-space position from the previous tick.


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