diff options
author | Campbell Barton <ideasman42@gmail.com> | 2008-08-27 07:34:53 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2008-08-27 07:34:53 +0400 |
commit | d5667656353a6ce8247d1e1c125471688c679bd8 (patch) | |
tree | 2868244c59159d783d2e2ceb93162ed5af6d40b8 /source/gameengine/Converter | |
parent | 6778c8dc2914e5714f0211d0643c1ade34864d02 (diff) |
get/set Angular velocity for KX_GameObjects python api and for the AddObject actuator.
Needed so objects created in an explosion could start spinning without having motion actuators and collision sensors on each item.
Diffstat (limited to 'source/gameengine/Converter')
-rw-r--r-- | source/gameengine/Converter/KX_ConvertActuators.cpp | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/source/gameengine/Converter/KX_ConvertActuators.cpp b/source/gameengine/Converter/KX_ConvertActuators.cpp index e71928b8cee..9ec8bdd91fc 100644 --- a/source/gameengine/Converter/KX_ConvertActuators.cpp +++ b/source/gameengine/Converter/KX_ConvertActuators.cpp @@ -573,10 +573,16 @@ void BL_ConvertActuators(char* maggiename, originalval = converter->FindGameObject(editobact->ob); } } - MT_Vector3 linvelvec ( KX_BLENDERTRUNC(editobact->linVelocity[0]), + MT_Vector3 linvelvec ( + KX_BLENDERTRUNC(editobact->linVelocity[0]), KX_BLENDERTRUNC(editobact->linVelocity[1]), KX_BLENDERTRUNC(editobact->linVelocity[2])); - + + MT_Vector3 angvelvec ( + KX_BLENDERTRUNC(editobact->angVelocity[0]), + KX_BLENDERTRUNC(editobact->angVelocity[1]), + KX_BLENDERTRUNC(editobact->angVelocity[2])); + KX_SCA_AddObjectActuator* tmpaddact = new KX_SCA_AddObjectActuator( gameobj, @@ -584,7 +590,9 @@ void BL_ConvertActuators(char* maggiename, editobact->time, scene, linvelvec.getValue(), - editobact->localflag!=0 + (editobact->localflag & ACT_EDOB_LOCAL_LINV)!=0, + angvelvec.getValue(), + (editobact->localflag & ACT_EDOB_LOCAL_ANGV)!=0 ); //editobact->ob to gameobj |