58 "CHARACTER",
"VEHICLE",
"UNKOWN"
79 [[nodiscard]]
virtual bool moveTo(
const vec3<F32>& targetPosition,
const U64 deltaTimeUS );
80 [[nodiscard]]
virtual bool moveToX(
F32 targetPosition,
const U64 deltaTimeUS );
81 [[nodiscard]]
virtual bool moveToY(
F32 targetPosition,
const U64 deltaTimeUS );
82 [[nodiscard]]
virtual bool moveToZ(
F32 targetPosition,
const U64 deltaTimeUS );
static void setParentNode(Unit *unit, SceneGraphNode *node)
Utility class that adds basic GUID management to objects.
F32 _moveSpeed
Movement speed (meters per second)
const vec3< F32 > & getTargetPosition() const
Get the unit's target coordinates in the world.
virtual bool teleportTo(const vec3< F32 > &targetPosition)
teleportTo instantly places the unit at the desired position
virtual void setAttribute(U32 attributeID, I32 initialValue)
virtual void setMovementSpeed(const F32 movementSpeed)
vec3< F32 > _currentPosition
Unit position in world.
virtual bool moveToZ(F32 targetPosition, const U64 deltaTimeUS)
Move along the Z axis.
PROPERTY_RW(UnitType, type, UnitType::COUNT)
F32 getMovementTolerance() const
Get the units current movement tolerance.
virtual void setAcceleration(const F32 acceleration)
Set the unit's acceleration in metres per second squared.
SharedMutex _unitUpdateMutex
F32 _acceleration
Acceleration (meters per second squared.
virtual bool moveTo(const vec3< F32 > &targetPosition, const U64 deltaTimeUS)
virtual void setParentNode(SceneGraphNode *node)
const vec3< F32 > & getCurrentPosition() const
F32 _moveTolerance
acceptable distance from target
virtual bool moveToX(F32 targetPosition, const U64 deltaTimeUS)
Move along the X axis.
void setMovementTolerance(const F32 movementTolerance)
Set destination tolerance.
virtual I32 getAttribute(U32 attributeID) const
hashMap< U32, I32 > AttributeMap
virtual F32 getMovementSpeed() const
Get the unit's current movement speed.
SceneGraphNode * getBoundNode() const
Get bound node.
virtual F32 getAcceleration() const
Get the unit's acceleration rate.
virtual bool moveToY(F32 targetPosition, const U64 deltaTimeUS)
Move along the Y axis.
vec3< F32 > _currentTargetPosition
Current destination point cached.
static const char * unitType[]
const char * UnitTypeToString(UnitType unitType) noexcept
UnitType StringToUnitType(const string &name)
Handle console commands that start with a forward slash.
UnitType
Currently supported unit types.
@ COUNT
add more types above this
@ UNIT_TYPE_VEHICLE
e.g. Cars, planes, ships etc
@ UNIT_TYPE_CHARACTER
"Living beings"
std::shared_mutex SharedMutex
hashAlg::unordered_map< K, V, HashFun, Predicate > hashMap