diff options
Diffstat (limited to 'scene/3d/interpolated_camera.cpp')
-rw-r--r-- | scene/3d/interpolated_camera.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/scene/3d/interpolated_camera.cpp b/scene/3d/interpolated_camera.cpp index 4d8c9cf7a5..2f35164f49 100644 --- a/scene/3d/interpolated_camera.cpp +++ b/scene/3d/interpolated_camera.cpp @@ -32,9 +32,9 @@ void InterpolatedCamera::_notification(int p_what) { switch(p_what) { - case NOTIFICATION_ENTER_SCENE: { + case NOTIFICATION_ENTER_TREE: { - if (get_scene()->is_editor_hint() && enabled) + if (get_tree()->is_editor_hint() && enabled) set_fixed_process(false); } break; @@ -50,7 +50,7 @@ void InterpolatedCamera::_notification(int p_what) { float delta = speed*get_process_delta_time(); Transform target_xform = node->get_global_transform(); - Transform local_transform = get_transform(); + Transform local_transform = get_global_transform(); local_transform = local_transform.interpolate_with(target_xform,delta); set_global_transform(local_transform); @@ -109,7 +109,7 @@ void InterpolatedCamera::set_interpolation_enabled(bool p_enable) { return; enabled=p_enable; if (p_enable) { - if (is_inside_scene() && get_scene()->is_editor_hint()) + if (is_inside_tree() && get_tree()->is_editor_hint()) return; set_process(true); } else @@ -136,7 +136,7 @@ void InterpolatedCamera::_bind_methods() { ObjectTypeDB::bind_method(_MD("set_target_path","target_path"),&InterpolatedCamera::set_target_path); ObjectTypeDB::bind_method(_MD("get_target_path"),&InterpolatedCamera::get_target_path); - ObjectTypeDB::bind_method(_MD("set_target","target"),&InterpolatedCamera::_set_target); + ObjectTypeDB::bind_method(_MD("set_target","target:Camera"),&InterpolatedCamera::_set_target); ObjectTypeDB::bind_method(_MD("set_speed","speed"),&InterpolatedCamera::set_speed); ObjectTypeDB::bind_method(_MD("get_speed"),&InterpolatedCamera::get_speed); |