MovementAiComponent pass

This commit is contained in:
David Markowitz 2023-07-09 20:38:47 -07:00
parent 2528e02b98
commit 8a512e5c76
3 changed files with 94 additions and 218 deletions

View File

@ -37,10 +37,7 @@ CDPhysicsComponentTable::~CDPhysicsComponentTable() {
} }
CDPhysicsComponent* CDPhysicsComponentTable::GetByID(unsigned int componentID) { CDPhysicsComponent* CDPhysicsComponentTable::GetByID(unsigned int componentID) {
for (auto e : m_entries) { auto itr = m_entries.find(componentID);
if (e.first == componentID) return e.second; return itr != m_entries.end() ? itr->second : nullptr;
}
return nullptr;
} }

View File

@ -10,10 +10,16 @@
#include "EntityManager.h" #include "EntityManager.h"
#include "SimplePhysicsComponent.h" #include "SimplePhysicsComponent.h"
#include "CDClientManager.h" #include "CDClientManager.h"
#include "Game.h"
#include "dLogger.h"
#include "SimplePhysicsComponent.h"
#include "ControllablePhysicsComponent.h"
#include "CDComponentsRegistryTable.h" #include "CDComponentsRegistryTable.h"
#include "CDPhysicsComponentTable.h" #include "CDPhysicsComponentTable.h"
#include "CDMovementAIComponentTable.h" #include "CDMovementAIComponentTable.h"
#include "Entity.h"
#include "BaseCombatAIComponent.h"
std::map<LOT, float> MovementAIComponent::m_PhysicsSpeedCache = {}; std::map<LOT, float> MovementAIComponent::m_PhysicsSpeedCache = {};
@ -23,14 +29,9 @@ MovementAIComponent::MovementAIComponent(Entity* parent, int32_t componentId) :
m_BaseCombatAI = nullptr; m_BaseCombatAI = nullptr;
m_BaseCombatAI = m_ParentEntity->GetComponent<BaseCombatAIComponent>();
m_BaseSpeed = GetBaseSpeed(m_ParentEntity->GetLOT());
m_NextWaypoint = GetCurrentPosition();
m_Acceleration = 0.4f; m_Acceleration = 0.4f;
m_Interrupted = false; m_Interrupted = false;
m_PullPoint = {}; m_PullPoint = NiPoint3::ZERO;
m_HaltDistance = 0; m_HaltDistance = 0;
m_Timer = 0; m_Timer = 0;
m_CurrentSpeed = 0; m_CurrentSpeed = 0;
@ -40,22 +41,21 @@ MovementAIComponent::MovementAIComponent(Entity* parent, int32_t componentId) :
} }
void MovementAIComponent::Startup() { void MovementAIComponent::Startup() {
m_BaseCombatAI = m_ParentEntity->GetComponent<BaseCombatAIComponent>();
m_NextWaypoint = GetCurrentPosition();
} }
void MovementAIComponent::LoadConfigData() { void MovementAIComponent::LoadConfigData() {
bool useWanderDB = m_ParentEntity->GetVar<bool>(u"usewanderdb"); bool useWanderDB = m_ParentEntity->GetVar<bool>(u"usewanderdb");
if (!useWanderDB) { if (useWanderDB) return;
const auto wanderOverride = m_ParentEntity->GetVarAs<float>(u"wanderRadius"); const auto wanderOverride = m_ParentEntity->GetVarAs<float>(u"wanderRadius");
if (wanderOverride != 0.0f) { if (wanderOverride != 0.0f) m_Info.wanderRadius = wanderOverride;
m_Info.wanderRadius = wanderOverride;
}
}
} }
void MovementAIComponent::LoadTemplateData() { void MovementAIComponent::LoadTemplateData() {
m_BaseSpeed = GetBaseSpeed(m_ParentEntity->GetLOT());
if (m_ComponentId == -1) return; if (m_ComponentId == -1) return;
auto* movementAiComponentTable = CDClientManager::Instance().GetTable<CDMovementAIComponentTable>(); auto* movementAiComponentTable = CDClientManager::Instance().GetTable<CDMovementAIComponentTable>();
auto movementEntries = movementAiComponentTable->Query([this](CDMovementAIComponent entry) {return (entry.id == this->m_ComponentId); }); auto movementEntries = movementAiComponentTable->Query([this](CDMovementAIComponent entry) {return (entry.id == this->m_ComponentId); });
@ -88,11 +88,11 @@ void MovementAIComponent::Update(const float deltaTime) {
const auto speed = deltaTime * 2.5f; const auto speed = deltaTime * 2.5f;
NiPoint3 velocity; NiPoint3 velocity(
(m_PullPoint.x - source.x) * speed,
velocity.x = (m_PullPoint.x - source.x) * speed; (m_PullPoint.y - source.y) * speed,
velocity.y = (m_PullPoint.y - source.y) * speed; (m_PullPoint.z - source.z) * speed
velocity.z = (m_PullPoint.z - source.z) * speed; );
SetPosition(source + velocity); SetPosition(source + velocity);
@ -103,28 +103,24 @@ void MovementAIComponent::Update(const float deltaTime) {
return; return;
} }
if (AtFinalWaypoint()) // Are we done? // Are we done?
{ if (AtFinalWaypoint()) return;
return;
}
if (m_HaltDistance > 0) { if (m_HaltDistance > 0) {
if (Vector3::DistanceSquared(ApproximateLocation(), GetDestination()) < m_HaltDistance * m_HaltDistance) // Prevent us from hugging the target // Prevent us from hugging the target
{ if (Vector3::DistanceSquared(ApproximateLocation(), GetDestination()) < m_HaltDistance * m_HaltDistance) {
Stop(); Stop();
return; return;
} }
} }
if (m_Timer > 0) { if (m_Timer > 0.0f) {
m_Timer -= deltaTime; m_Timer -= deltaTime;
if (m_Timer > 0) { if (m_Timer > 0.0f) return;
return;
}
m_Timer = 0; m_Timer = 0.0f;
} }
const auto source = GetCurrentWaypoint(); const auto source = GetCurrentWaypoint();
@ -189,10 +185,6 @@ nextAction:
EntityManager::Instance()->SerializeEntity(m_ParentEntity); EntityManager::Instance()->SerializeEntity(m_ParentEntity);
} }
const MovementAIInfo& MovementAIComponent::GetInfo() const {
return m_Info;
}
bool MovementAIComponent::AdvanceWaypointIndex() { bool MovementAIComponent::AdvanceWaypointIndex() {
if (m_PathIndex >= m_CurrentPath.size()) { if (m_PathIndex >= m_CurrentPath.size()) {
return false; return false;
@ -204,37 +196,23 @@ bool MovementAIComponent::AdvanceWaypointIndex() {
} }
NiPoint3 MovementAIComponent::GetCurrentWaypoint() const { NiPoint3 MovementAIComponent::GetCurrentWaypoint() const {
if (m_PathIndex >= m_CurrentPath.size()) { return m_PathIndex >= m_CurrentPath.size() ? GetCurrentPosition() : m_CurrentPath[m_PathIndex];
return GetCurrentPosition();
}
return m_CurrentPath[m_PathIndex];
}
NiPoint3 MovementAIComponent::GetNextWaypoint() const {
return m_NextWaypoint;
}
NiPoint3 MovementAIComponent::GetCurrentPosition() const {
return m_ParentEntity->GetPosition();
} }
NiPoint3 MovementAIComponent::ApproximateLocation() const { NiPoint3 MovementAIComponent::ApproximateLocation() const {
auto source = GetCurrentPosition(); auto source = GetCurrentPosition();
if (m_Done) { if (m_Done) return source;
return source;
}
auto destination = m_NextWaypoint; auto destination = m_NextWaypoint;
auto factor = m_TotalTime > 0 ? (m_TotalTime - m_Timer) / m_TotalTime : 0; auto factor = m_TotalTime > 0.0f ? (m_TotalTime - m_Timer) / m_TotalTime : 0.0f;
auto x = source.x + factor * (destination.x - source.x); NiPoint3 approximation = NiPoint3(
auto y = source.y + factor * (destination.y - source.y); source.x + factor * (destination.x - source.x),
auto z = source.z + factor * (destination.z - source.z); source.y + factor * (destination.y - source.y),
source.z + factor * (destination.z - source.z)
NiPoint3 approximation = NiPoint3(x, y, z); );
if (dpWorld::Instance().IsLoaded()) { if (dpWorld::Instance().IsLoaded()) {
approximation.y = dpWorld::Instance().GetNavMesh()->GetHeightAtPoint(approximation); approximation.y = dpWorld::Instance().GetNavMesh()->GetHeightAtPoint(approximation);
@ -263,32 +241,23 @@ bool MovementAIComponent::Warp(const NiPoint3& point) {
return true; return true;
} }
float MovementAIComponent::GetTimer() const {
return m_Timer;
}
bool MovementAIComponent::AtFinalWaypoint() const {
return m_Done;
}
void MovementAIComponent::Stop() { void MovementAIComponent::Stop() {
if (m_Done) { if (m_Done) return;
return;
}
SetPosition(ApproximateLocation()); SetPosition(ApproximateLocation());
SetVelocity(NiPoint3::ZERO); SetVelocity(NiPoint3::ZERO);
m_TotalTime = m_Timer = 0; m_TotalTime = 0.0f;
m_Timer = 0.0f;
m_Done = true; m_Done = true;
m_CurrentPath = {}; m_CurrentPath.clear();
m_PathIndex = 0; m_PathIndex = 0;
m_CurrentSpeed = 0; m_CurrentSpeed = 0.0f;
EntityManager::Instance()->SerializeEntity(m_ParentEntity); EntityManager::Instance()->SerializeEntity(m_ParentEntity);
} }
@ -300,11 +269,9 @@ void MovementAIComponent::PullToPoint(const NiPoint3& point) {
m_PullPoint = point; m_PullPoint = point;
} }
void MovementAIComponent::SetPath(std::vector<NiPoint3> path) { void MovementAIComponent::SetPath(const std::vector<NiPoint3>& path) {
std::reverse(path.begin(), path.end()); for (auto itr = path.rbegin(); itr != path.rend(); ++itr) {
m_Queue.push(*itr);
for (const auto& point : path) {
m_Queue.push(point);
} }
SetDestination(m_Queue.top()); SetDestination(m_Queue.top());
@ -312,7 +279,7 @@ void MovementAIComponent::SetPath(std::vector<NiPoint3> path) {
m_Queue.pop(); m_Queue.pop();
} }
float MovementAIComponent::GetBaseSpeed(LOT lot) { float MovementAIComponent::GetBaseSpeed(const LOT lot) {
// Check if the lot is in the cache // Check if the lot is in the cache
const auto& it = m_PhysicsSpeedCache.find(lot); const auto& it = m_PhysicsSpeedCache.find(lot);
@ -320,30 +287,19 @@ float MovementAIComponent::GetBaseSpeed(LOT lot) {
return it->second; return it->second;
} }
CDComponentsRegistryTable* componentRegistryTable = CDClientManager::Instance().GetTable<CDComponentsRegistryTable>(); auto* componentRegistryTable = CDClientManager::Instance().GetTable<CDComponentsRegistryTable>();
CDPhysicsComponentTable* physicsComponentTable = CDClientManager::Instance().GetTable<CDPhysicsComponentTable>(); auto* physicsComponentTable = CDClientManager::Instance().GetTable<CDPhysicsComponentTable>();
int32_t componentID; int32_t componentID;
CDPhysicsComponent* physicsComponent = nullptr; CDPhysicsComponent* physicsComponent = nullptr;
componentID = componentRegistryTable->GetByIDAndType(lot, eReplicaComponentType::CONTROLLABLE_PHYSICS, -1); componentID = componentRegistryTable->GetByIDAndType(lot, eReplicaComponentType::CONTROLLABLE_PHYSICS, -1);
if (componentID != -1) { if (componentID == -1) {
physicsComponent = physicsComponentTable->GetByID(componentID);
goto foundComponent;
}
componentID = componentRegistryTable->GetByIDAndType(lot, eReplicaComponentType::SIMPLE_PHYSICS, -1); componentID = componentRegistryTable->GetByIDAndType(lot, eReplicaComponentType::SIMPLE_PHYSICS, -1);
if (componentID != -1) {
physicsComponent = physicsComponentTable->GetByID(componentID);
goto foundComponent;
} }
foundComponent: physicsComponent = physicsComponentTable->GetByID(componentID);
// Client defaults speed to 10 and if the speed is also null in the table, it defaults to 10. // Client defaults speed to 10 and if the speed is also null in the table, it defaults to 10.
float speed = 10.0f; float speed = 10.0f;
@ -358,46 +314,18 @@ foundComponent:
return speed; return speed;
} }
void MovementAIComponent::SetPosition(const NiPoint3& value) { void MovementAIComponent::SetPosition(const NiPoint3& value) const {
m_ParentEntity->SetPosition(value);
}
void MovementAIComponent::SetRotation(const NiQuaternion& value) const {
if (!m_LockRotation) m_ParentEntity->SetRotation(value);
}
void MovementAIComponent::SetVelocity(const NiPoint3& value) const {
auto* controllablePhysicsComponent = m_ParentEntity->GetComponent<ControllablePhysicsComponent>(); auto* controllablePhysicsComponent = m_ParentEntity->GetComponent<ControllablePhysicsComponent>();
if (controllablePhysicsComponent != nullptr) { if (controllablePhysicsComponent) {
controllablePhysicsComponent->SetPosition(value);
return;
}
auto* simplePhysicsComponent = m_ParentEntity->GetComponent<SimplePhysicsComponent>();
if (simplePhysicsComponent != nullptr) {
simplePhysicsComponent->SetPosition(value);
}
}
void MovementAIComponent::SetRotation(const NiQuaternion& value) {
if (m_LockRotation) {
return;
}
auto* controllablePhysicsComponent = m_ParentEntity->GetComponent<ControllablePhysicsComponent>();
if (controllablePhysicsComponent != nullptr) {
controllablePhysicsComponent->SetRotation(value);
return;
}
auto* simplePhysicsComponent = m_ParentEntity->GetComponent<SimplePhysicsComponent>();
if (simplePhysicsComponent != nullptr) {
simplePhysicsComponent->SetRotation(value);
}
}
void MovementAIComponent::SetVelocity(const NiPoint3& value) {
auto* controllablePhysicsComponent = m_ParentEntity->GetComponent<ControllablePhysicsComponent>();
if (controllablePhysicsComponent != nullptr) {
controllablePhysicsComponent->SetVelocity(value); controllablePhysicsComponent->SetVelocity(value);
return; return;
@ -405,26 +333,17 @@ void MovementAIComponent::SetVelocity(const NiPoint3& value) {
auto* simplePhysicsComponent = m_ParentEntity->GetComponent<SimplePhysicsComponent>(); auto* simplePhysicsComponent = m_ParentEntity->GetComponent<SimplePhysicsComponent>();
if (simplePhysicsComponent != nullptr) { if (simplePhysicsComponent) {
simplePhysicsComponent->SetVelocity(value); simplePhysicsComponent->SetVelocity(value);
} }
} }
void MovementAIComponent::SetDestination(const NiPoint3& value) { void MovementAIComponent::SetDestination(const NiPoint3& value) {
if (m_Interrupted) { if (m_Interrupted) return;
return;
}
/*if (Vector3::DistanceSquared(value, GetDestination()) < 2 * 2)
{
return;
}*/
const auto location = ApproximateLocation(); const auto location = ApproximateLocation();
if (!AtFinalWaypoint()) { if (!AtFinalWaypoint()) SetPosition(location);
SetPosition(location);
}
std::vector<NiPoint3> computedPath; std::vector<NiPoint3> computedPath;
@ -446,17 +365,15 @@ void MovementAIComponent::SetDestination(const NiPoint3& value) {
} }
} }
if (computedPath.empty()) // Somehow failed // Somehow failed
{ if (computedPath.empty()) return;
return;
}
m_CurrentPath.clear(); m_CurrentPath.clear();
m_CurrentPath.push_back(location); m_CurrentPath.push_back(location);
// Simply path // Simply path
for (auto point : computedPath) { for (auto& point : computedPath) {
if (dpWorld::Instance().IsLoaded()) { if (dpWorld::Instance().IsLoaded()) {
point.y = dpWorld::Instance().GetNavMesh()->GetHeightAtPoint(point); point.y = dpWorld::Instance().GetNavMesh()->GetHeightAtPoint(point);
} }
@ -464,21 +381,18 @@ void MovementAIComponent::SetDestination(const NiPoint3& value) {
m_CurrentPath.push_back(point); m_CurrentPath.push_back(point);
} }
m_CurrentPath.push_back(computedPath[computedPath.size() - 1]); m_CurrentPath.push_back(computedPath.back());
m_PathIndex = 0; m_PathIndex = 0;
m_TotalTime = m_Timer = 0; m_TotalTime = 0.0f;
m_Timer = 0.0f;
m_Done = false; m_Done = false;
} }
NiPoint3 MovementAIComponent::GetDestination() const { NiPoint3 MovementAIComponent::GetDestination() const {
if (m_CurrentPath.empty()) { return m_CurrentPath.empty() ? GetCurrentPosition() : m_CurrentPath.back();
return GetCurrentPosition();
}
return m_CurrentPath[m_CurrentPath.size() - 1];
} }
void MovementAIComponent::SetSpeed(const float value) { void MovementAIComponent::SetSpeed(const float value) {
@ -486,38 +400,6 @@ void MovementAIComponent::SetSpeed(const float value) {
m_Acceleration = value / 5; m_Acceleration = value / 5;
} }
float MovementAIComponent::GetSpeed() const { NiPoint3 MovementAIComponent::GetCurrentPosition() const {
return m_Speed; return m_ParentEntity->GetPosition();
}
void MovementAIComponent::SetAcceleration(const float value) {
m_Acceleration = value;
}
float MovementAIComponent::GetAcceleration() const {
return m_Acceleration;
}
void MovementAIComponent::SetHaltDistance(const float value) {
m_HaltDistance = value;
}
float MovementAIComponent::GetHaltDistance() const {
return m_HaltDistance;
}
void MovementAIComponent::SetCurrentSpeed(float value) {
m_CurrentSpeed = value;
}
float MovementAIComponent::GetCurrentSpeed() const {
return m_CurrentSpeed;
}
void MovementAIComponent::SetLockRotation(bool value) {
m_LockRotation = value;
}
bool MovementAIComponent::GetLockRotation() const {
return m_LockRotation;
} }

View File

@ -3,18 +3,16 @@
* Copyright 2018 * Copyright 2018
*/ */
#ifndef MOVEMENTAICOMPONENT_H #ifndef __MOVEMENTAICOMPONENT_H__
#define MOVEMENTAICOMPONENT_H #define __MOVEMENTAICOMPONENT_H__
#pragma once
#include <cstdint>
#include <stack>
#include <vector>
#include "BitStream.h"
#include "Entity.h"
#include "GameMessages.h"
#include "EntityManager.h"
#include "Game.h"
#include "dLogger.h"
#include "Component.h" #include "Component.h"
#include "eReplicaComponentType.h" #include "eReplicaComponentType.h"
#include <vector>
class ControllablePhysicsComponent; class ControllablePhysicsComponent;
class BaseCombatAIComponent; class BaseCombatAIComponent;
@ -23,7 +21,6 @@ class BaseCombatAIComponent;
* Information that describes the different variables used to make an entity move around * Information that describes the different variables used to make an entity move around
*/ */
struct MovementAIInfo { struct MovementAIInfo {
// copy assignment // copy assignment
MovementAIInfo& operator=(const MovementAIInfo& other) = default; MovementAIInfo& operator=(const MovementAIInfo& other) = default;
@ -74,7 +71,7 @@ public:
* Returns the basic settings that this entity uses to move around * Returns the basic settings that this entity uses to move around
* @return the basic settings that this entity uses to move around * @return the basic settings that this entity uses to move around
*/ */
const MovementAIInfo& GetInfo() const; const MovementAIInfo& GetInfo() const { return m_Info; };
/** /**
* Set a destination point for the entity to move towards * Set a destination point for the entity to move towards
@ -92,61 +89,61 @@ public:
* Sets the max speed at which this entity may run * Sets the max speed at which this entity may run
* @param value the speed value to set * @param value the speed value to set
*/ */
void SetSpeed(float value); void SetSpeed(const float value);
/** /**
* Returns the max speed at which this entity may run * Returns the max speed at which this entity may run
* @return the max speed at which this entity may run * @return the max speed at which this entity may run
*/ */
float GetSpeed() const; float GetSpeed() const { return m_Speed; };
/** /**
* Sets how fast the entity will accelerate when not running at full speed * Sets how fast the entity will accelerate when not running at full speed
* @param value the acceleration to set * @param value the acceleration to set
*/ */
void SetAcceleration(float value); void SetAcceleration(const float value) { m_Acceleration = value; }
/** /**
* Returns the current speed at which this entity accelerates when not running at full speed * Returns the current speed at which this entity accelerates when not running at full speed
* @return the current speed at which this entity accelerates when not running at full speed * @return the current speed at which this entity accelerates when not running at full speed
*/ */
float GetAcceleration() const; float GetAcceleration() const { return m_Acceleration; };
/** /**
* Sets the halting distance (the distance at which we consider the target to be reached) * Sets the halting distance (the distance at which we consider the target to be reached)
* @param value the halting distance to set * @param value the halting distance to set
*/ */
void SetHaltDistance(float value); void SetHaltDistance(const float value) { m_HaltDistance = value; }
/** /**
* Returns the current halting distance (the distance at which we consider the target to be reached) * Returns the current halting distance (the distance at which we consider the target to be reached)
* @return the current halting distance * @return the current halting distance
*/ */
float GetHaltDistance() const; float GetHaltDistance() const { return m_HaltDistance; };
/** /**
* Sets the speed the entity is currently running at * Sets the speed the entity is currently running at
* @param value the speed value to set * @param value the speed value to set
*/ */
void SetCurrentSpeed(float value); void SetCurrentSpeed(const float value) { m_CurrentSpeed = value; }
/** /**
* Returns the speed the entity is currently running at * Returns the speed the entity is currently running at
* @return the speed the entity is currently running at * @return the speed the entity is currently running at
*/ */
float GetCurrentSpeed() const; float GetCurrentSpeed() const { return m_CurrentSpeed; };
/** /**
* Locks the rotation of this entity in place, depending on the argument * Locks the rotation of this entity in place, depending on the argument
* @param value if true, the entity will be rotationally locked * @param value if true, the entity will be rotationally locked
*/ */
void SetLockRotation(bool value); void SetLockRotation(const bool value) { m_LockRotation = value; }
/** /**
* Returns whether this entity is currently rotationally locked * Returns whether this entity is currently rotationally locked
* @return true if the entity is rotationally locked, false otherwise * @return true if the entity is rotationally locked, false otherwise
*/ */
bool GetLockRotation() const; bool GetLockRotation() const { return m_LockRotation; };
/** /**
* Attempts to update the waypoint index, making the entity move to the next waypoint * Attempts to update the waypoint index, making the entity move to the next waypoint
@ -164,7 +161,7 @@ public:
* Returns the waypoint this entity is supposed to move towards next * Returns the waypoint this entity is supposed to move towards next
* @return the waypoint this entity is supposed to move towards next * @return the waypoint this entity is supposed to move towards next
*/ */
NiPoint3 GetNextWaypoint() const; NiPoint3 GetNextWaypoint() const { return m_NextWaypoint; };
/** /**
* Returns the current position of this entity * Returns the current position of this entity
@ -190,13 +187,13 @@ public:
* Returns the time it will take to reach the final waypoint according to the current speed * Returns the time it will take to reach the final waypoint according to the current speed
* @return the time it will take to reach the final waypoint according to the current speed * @return the time it will take to reach the final waypoint according to the current speed
*/ */
float GetTimer() const; float GetTimer() const { return m_Timer; };
/** /**
* Returns if the entity is at its final waypoint * Returns if the entity is at its final waypoint
* @return if the entity is at its final waypoint * @return if the entity is at its final waypoint
*/ */
bool AtFinalWaypoint() const; bool AtFinalWaypoint() const { return m_Done; };
/** /**
* Renders the entity stationary * Renders the entity stationary
@ -214,14 +211,14 @@ public:
* Sets a path to follow for the AI * Sets a path to follow for the AI
* @param path the path to follow * @param path the path to follow
*/ */
void SetPath(std::vector<NiPoint3> path); void SetPath(const std::vector<NiPoint3>& path);
/** /**
* Returns the base speed from the DB for a given LOT * Returns the base speed from the DB for a given LOT
* @param lot the lot to check for * @param lot the lot to check for
* @return the base speed of the lot * @return the base speed of the lot
*/ */
static float GetBaseSpeed(LOT lot); static float GetBaseSpeed(const LOT lot);
void SetMoveInfo(const MovementAIInfo& value); void SetMoveInfo(const MovementAIInfo& value);
private: private:
@ -230,19 +227,19 @@ private:
* Sets the current position of the entity * Sets the current position of the entity
* @param value the position to set * @param value the position to set
*/ */
void SetPosition(const NiPoint3& value); void SetPosition(const NiPoint3& value) const;
/** /**
* Sets the current rotation of the entity * Sets the current rotation of the entity
* @param value the rotation to set * @param value the rotation to set
*/ */
void SetRotation(const NiQuaternion& value); void SetRotation(const NiQuaternion& value) const;
/** /**
* Sets the current velocity of the entityes * Sets the current velocity of the entityes
* @param value the velocity to set * @param value the velocity to set
*/ */
void SetVelocity(const NiPoint3& value); void SetVelocity(const NiPoint3& value) const;
/** /**
* Base information regarding the movement information for this entity * Base information regarding the movement information for this entity
@ -337,4 +334,4 @@ private:
int32_t m_ComponentId; int32_t m_ComponentId;
}; };
#endif // MOVEMENTAICOMPONENT_H #endif // __MOVEMENTAICOMPONENT_H__