Page MenuHome

Drivers in Game Engine don't work for Spawned objects
Closed, ArchivedPublic

Description

System Information
Mac OS X 10.10.4
NVIDIA GeForce 8600M GT 256 MB

Blender Version
Broken: 2.75a c27589e

In Blender Game Engine one situation where shape key drivers work is for bones that are parents and also deform a mesh.

The drivers fail when the armature is spawned during runtime.

Based on a attached .blend file with minimum amount of steps

Press P. Wait for second cube to spawn and watch. The first cube shape key drivers work. The second spawn cube is identical but the drivers don't work.

Event Timeline

Michael Carroll (mkec) raised the priority of this task from to 90.
Michael Carroll (mkec) updated the task description. (Show Details)
Michael Carroll (mkec) edited a custom field.

Hi, @Mitchell Stokes (moguri): About https://developer.blender.org/T45742 (Drivers in Game Engine don't work for spawned objects), I made a git bisect with this test file: http://www.pasteall.org/blend/38719 and found that the first bad commit was: https://developer.blender.org/rBfe05f97841c0ee3e2a6e15f2252ad160fefc3509 (multi-threaded animations). After hours of investigations :) I think the problem is linked to BL_ArmatureObject::ProcessReplica()
function, m_objArma = BKE_object_copy(m_objArma); I'm not sure but if you comment this line, the drivers for spawned objects work again... BUT the bge crashes when you escape the game. I think I'm not experimented enough to fix the bug myself (I'll make some tries however :) ) but I just wanted to inform you :)

Aaron Carlisle (Blendify) changed the task status from Unknown Status to Unknown Status.Jun 29 2019, 2:18 AM
Aaron Carlisle (Blendify) claimed this task.

This task is being closed because the BGE has been removed in Blender 2.8.