Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Samarin <nicks1987@bigmir.net>2010-08-15 16:58:13 +0400
committerNick Samarin <nicks1987@bigmir.net>2010-08-15 16:58:13 +0400
commitb822f0bb7a756ea48a035161db9576ec768098ee (patch)
tree3471c07286f75cdb200d68d57e3e7228eb634c26 /source/gameengine/Ketsji/KX_SteeringActuator.h
parent3a8f3dd3f5e843ef8abad41996ebe5f7041e3807 (diff)
added option for automatic facing in steering actuator
Diffstat (limited to 'source/gameengine/Ketsji/KX_SteeringActuator.h')
-rw-r--r--source/gameengine/Ketsji/KX_SteeringActuator.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/source/gameengine/Ketsji/KX_SteeringActuator.h b/source/gameengine/Ketsji/KX_SteeringActuator.h
index b07d906dba3..78fb29f4124 100644
--- a/source/gameengine/Ketsji/KX_SteeringActuator.h
+++ b/source/gameengine/Ketsji/KX_SteeringActuator.h
@@ -38,6 +38,7 @@
#include "SCA_IActuator.h"
#include "SCA_LogicManager.h"
+#include "MT_Matrix3x3.h"
class KX_GameObject;
class KX_NavMeshObject;
@@ -64,11 +65,15 @@ class KX_SteeringActuator : public SCA_IActuator
bool m_isActive;
bool m_isSelfTerminated;
bool m_enableVisualization;
+ short m_facingMode;
float m_path[MAX_PATH_LENGTH*3];
int m_pathLen;
int m_pathUpdatePeriod;
double m_pathUpdateTime;
int m_wayPointIdx;
+ MT_Matrix3x3 m_parentlocalmat;
+ MT_Vector3 m_steerVec;
+ void HandleActorFace(MT_Vector3& velocity);
public:
enum KX_STEERINGACT_MODE
{
@@ -90,6 +95,7 @@ public:
bool isSelfTerminated,
int pathUpdatePeriod,
KX_ObstacleSimulation* simulation,
+ short facingmode,
bool enableVisualization);
virtual ~KX_SteeringActuator();
virtual bool Update(double curtime, bool frame);
@@ -98,6 +104,7 @@ public:
virtual void ProcessReplica();
virtual void Relink(GEN_Map<GEN_HashedPtr, void*> *obj_map);
virtual bool UnlinkObject(SCA_IObject* clientobj);
+ const MT_Vector3& GetSteeringVec();
#ifndef DISABLE_PYTHON
@@ -110,6 +117,7 @@ public:
static int pyattr_set_target(void *self, const struct KX_PYATTRIBUTE_DEF *attrdef, PyObject *value);
static PyObject* pyattr_get_navmesh(void *self, const struct KX_PYATTRIBUTE_DEF *attrdef);
static int pyattr_set_navmesh(void *self, const struct KX_PYATTRIBUTE_DEF *attrdef, PyObject *value);
+ static PyObject* pyattr_get_steeringVec(void *self, const struct KX_PYATTRIBUTE_DEF *attrdef);
#endif // DISABLE_PYTHON