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:
authorErwin Coumans <blender@erwincoumans.com>2005-08-05 21:00:32 +0400
committerErwin Coumans <blender@erwincoumans.com>2005-08-05 21:00:32 +0400
commitb6d9fbf0dbe44efee9309f09bc1a518a2cd67813 (patch)
tree43aaf1f693bec9849914001b9cf1fd1dce185de1 /source/gameengine/Ketsji/KX_GameObject.cpp
parent0f044af97ef785f73e0aa2188716dcafd0c0d54e (diff)
fixed the mouse-over sensor,
added raycast support for bullet (no triangle-mesh support, soon) added python methods for 'getHitObject', getRayDirection, getHitPosition and getHitNormal for mouse over sensor, which makes it easy for a shootout.blend demo :)
Diffstat (limited to 'source/gameengine/Ketsji/KX_GameObject.cpp')
-rw-r--r--source/gameengine/Ketsji/KX_GameObject.cpp16
1 files changed, 13 insertions, 3 deletions
diff --git a/source/gameengine/Ketsji/KX_GameObject.cpp b/source/gameengine/Ketsji/KX_GameObject.cpp
index 6e2c8a3d5d7..ee12efec684 100644
--- a/source/gameengine/Ketsji/KX_GameObject.cpp
+++ b/source/gameengine/Ketsji/KX_GameObject.cpp
@@ -953,16 +953,26 @@ PyObject* KX_GameObject::PyApplyImpulse(PyObject* self,
PyObject* pyattach;
PyObject* pyimpulse;
+
+ printf("impulse1\n");
+
if (PyArg_ParseTuple(args, "OO", &pyattach, &pyimpulse))
{
MT_Point3 attach;
MT_Vector3 impulse;
+ printf("impulse2\n");
- if (PyVecTo(pyattach, attach) && PyVecTo(pyimpulse, impulse) && m_pPhysicsController1)
+ if (m_pPhysicsController1)
{
- m_pPhysicsController1->applyImpulse(attach, impulse);
- Py_Return;
+ printf("impulse3\n");
+
+ if (PyVecTo(pyattach, attach) && PyVecTo(pyimpulse, impulse))
+ {
+ printf("impulse4\n");
+ m_pPhysicsController1->applyImpulse(attach, impulse);
+ Py_Return;
+ }
}
}