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:
authorBenoit Bolsee <benoit.bolsee@online.be>2008-04-15 00:54:20 +0400
committerBenoit Bolsee <benoit.bolsee@online.be>2008-04-15 00:54:20 +0400
commit566053319a47119bf718154f800659f9f0b86472 (patch)
treedecf82225fcbd22e9c7f937b53af02b4ad04911c /source/gameengine/Converter/KX_ConvertActuators.cpp
parent0b8b4369c9dbfd9f0048b54a74bf3669919e7f0f (diff)
fix BGE bug #8309: After Parent Object added to the visual layer, Child Camera won't follow.
This bug fix is made of two parts: 1) It's now possible to dynamically add a camera. 2) Empty camera name on a SetCamera actuator now points to the actuator's parent object if this object is a camera. This trick is useful to make current a dynamically created camera: just add a SetCamera actuator on the camera itself and leave the name empty. Later, when the camera is added in the scene with an AddObject actuator, either directly or via a parent object, you just need to activate the actuator to make the newly created camera current. If you set a name on a SetCamera actuator, it will always point to the original camera, even after replication.
Diffstat (limited to 'source/gameengine/Converter/KX_ConvertActuators.cpp')
-rw-r--r--source/gameengine/Converter/KX_ConvertActuators.cpp6
1 files changed, 1 insertions, 5 deletions
diff --git a/source/gameengine/Converter/KX_ConvertActuators.cpp b/source/gameengine/Converter/KX_ConvertActuators.cpp
index 68024100719..a9b84e8f51f 100644
--- a/source/gameengine/Converter/KX_ConvertActuators.cpp
+++ b/source/gameengine/Converter/KX_ConvertActuators.cpp
@@ -684,15 +684,11 @@ void BL_ConvertActuators(char* maggiename,
break;
}
case ACT_SCENE_CAMERA:
+ mode = KX_SceneActuator::KX_SCENE_SET_CAMERA;
if (sceneact->camera)
{
- mode = KX_SceneActuator::KX_SCENE_SET_CAMERA;
cam = (KX_Camera*) converter->FindGameObject(sceneact->camera);
}
- else
- {
- // TODO:warn user
- }
break;
case ACT_SCENE_RESTART:
{