get/set Angular velocity for KX_GameObjects python api and for the AddObject actuator.
[blender.git] / source / gameengine / Converter / KX_ConvertActuators.cpp
index e71928b8cee122d7051dfa2186e59d8f5264bce7..9ec8bdd91fcbddf0cab11bbeab367eec97284cde 100644 (file)
@@ -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