First of all, you should only access meshes if they are actually defined. Since you assign kuka
in an onLoad()
callback but the app renders right from the beginning, you should actually do this in render()
:
if ( kuka ) {
// now access kuka
}
Anyway, the runtime error indicates that kuka
seems to have no children. Can you please check in the debugger if this is the case?