Commit patch #8799: Realtime SetParent function in the BGE
authorBenoit Bolsee <benoit.bolsee@online.be>
Sun, 6 Apr 2008 18:30:52 +0000 (18:30 +0000)
committerBenoit Bolsee <benoit.bolsee@online.be>
Sun, 6 Apr 2008 18:30:52 +0000 (18:30 +0000)
commite7384c9dd2d93e3814e8df51eea64f1dc687c338
tree44fb5c808bb3af0783c675886e029e9e4bdb1a21
parent711306c2ba1c4ea0d0027087ce53746cde4be0ed
Commit patch #8799: Realtime SetParent function in the BGE

This patch consists in new KX_GameObject::SetParent() and KX_GameObject::RemoveParent() functions to create and destroy parent relation during game. These functions are accessible through python and through a new actuator KX_ParentActuator. Function documentation in PyDoc.
The object keeps its orientation, position and scale when it is parented but will further rotate, move and scale with its parent from that point on. When the parent relation is broken, the object keeps the orientation, position and scale it had at that time.
The function has no effect if any of the X/Y/Z scale of the object or its new parent are below Epsilon.
13 files changed:
projectfiles_vc7/gameengine/ketsji/KX_ketsji.vcproj
source/blender/blenkernel/intern/sca.c
source/blender/blenloader/intern/readfile.c
source/blender/blenloader/intern/writefile.c
source/blender/makesdna/DNA_actuator_types.h
source/blender/src/buttons_logic.c
source/gameengine/Converter/KX_ConvertActuators.cpp
source/gameengine/Ketsji/KX_GameObject.cpp
source/gameengine/Ketsji/KX_GameObject.h
source/gameengine/Ketsji/KX_ParentActuator.cpp [new file with mode: 0644]
source/gameengine/Ketsji/KX_ParentActuator.h [new file with mode: 0644]
source/gameengine/PyDoc/KX_GameObject.py
source/gameengine/PyDoc/KX_ParentActuator.py [new file with mode: 0644]