Files
MeshShadingDemo/src/Component/PathFollow.h
T

27 lines
800 B
C
Raw Normal View History

2025-07-01 20:38:31 +02:00
#pragma once
#include "Define.h"
#include <Math/Vector.h>
#include <Actor/Actor.h>
struct PathFollow
{
enum class SpeedControl {
Linear,
EaseInEaseOut
};
PEntity path;
// How many seconds since start of path, used to calculate new position in path
float time = 0.0f;
// How much distance per passed second will be traversed along the path
float traversalSpeed = 1.0f;
// The desired speed control function (choose Linear to simply use the traversal speed)
SpeedControl speedControl = SpeedControl::Linear;
// Distance travelled through the path
float distance = 0.0f;
// The entity's Transform will always get this offset applied
Vector pathOffset = Seele::Vector(0);
Vector lastPos = Vector(0);
2024-07-19 11:42:34 +02:00
};