Add 'mesh/skeleton' property to MeshInstance to decouple mesh->skeleton from child parent constraint

This commit is contained in:
marynate
2014-05-13 13:24:26 +08:00
parent 45a509282e
commit 7eb86f2fbc
3 changed files with 42 additions and 4 deletions

View File

@ -65,10 +65,12 @@ void VisualInstance::_notification(int p_what) {
VisualServer::get_singleton()->instance_set_room(instance,room->get_instance());
}
// CHECK SKELETON
// CHECK SKELETON => moving skeleton attaching logic to MeshInstance
/*
Skeleton *skeleton=get_parent()?get_parent()->cast_to<Skeleton>():NULL;
if (skeleton)
VisualServer::get_singleton()->instance_attach_skeleton( instance, skeleton->get_skeleton() );
*/
VisualServer::get_singleton()->instance_set_scenario( instance, get_world()->get_scenario() );