diff options
Diffstat (limited to 'scene/3d')
-rw-r--r-- | scene/3d/area.cpp | 12 | ||||
-rw-r--r-- | scene/3d/area.h | 4 | ||||
-rw-r--r-- | scene/3d/baked_light_instance.cpp | 6 | ||||
-rw-r--r-- | scene/3d/body_shape.cpp | 4 | ||||
-rw-r--r-- | scene/3d/camera.cpp | 28 | ||||
-rw-r--r-- | scene/3d/collision_object.cpp | 2 | ||||
-rw-r--r-- | scene/3d/gi_probe.cpp | 2 | ||||
-rw-r--r-- | scene/3d/mesh_instance.cpp | 2 | ||||
-rw-r--r-- | scene/3d/navigation.cpp | 2 | ||||
-rw-r--r-- | scene/3d/particles.cpp | 4 | ||||
-rw-r--r-- | scene/3d/physics_body.cpp | 20 | ||||
-rw-r--r-- | scene/3d/proximity_group.cpp | 2 | ||||
-rw-r--r-- | scene/3d/skeleton.cpp | 2 | ||||
-rw-r--r-- | scene/3d/spatial.cpp | 12 | ||||
-rw-r--r-- | scene/3d/spatial_stream_player.cpp | 16 | ||||
-rw-r--r-- | scene/3d/sprite_3d.cpp | 8 | ||||
-rw-r--r-- | scene/3d/sprite_3d.h | 4 | ||||
-rw-r--r-- | scene/3d/vehicle_body.cpp | 21 | ||||
-rw-r--r-- | scene/3d/vehicle_body.h | 2 | ||||
-rw-r--r-- | scene/3d/visual_instance.cpp | 6 |
20 files changed, 87 insertions, 72 deletions
diff --git a/scene/3d/area.cpp b/scene/3d/area.cpp index c4afed4b31..99e40984c5 100644 --- a/scene/3d/area.cpp +++ b/scene/3d/area.cpp @@ -295,7 +295,7 @@ void Area::_notification(int p_what) { } } -void Area::set_enable_monitoring(bool p_enable) { +void Area::set_monitoring(bool p_enable) { if (locked) { ERR_EXPLAIN("This function can't be used during the in/out signal."); @@ -433,7 +433,7 @@ void Area::_area_inout(int p_status,const RID& p_area, int p_instance, int p_are } -bool Area::is_monitoring_enabled() const { +bool Area::is_monitoring() const { return monitoring; } @@ -622,8 +622,8 @@ void Area::_bind_methods() { ClassDB::bind_method(_MD("is_monitorable"),&Area::is_monitorable); - ClassDB::bind_method(_MD("set_enable_monitoring","enable"),&Area::set_enable_monitoring); - ClassDB::bind_method(_MD("is_monitoring_enabled"),&Area::is_monitoring_enabled); + ClassDB::bind_method(_MD("set_monitoring","enable"),&Area::set_monitoring); + ClassDB::bind_method(_MD("is_monitoring"),&Area::is_monitoring); ClassDB::bind_method(_MD("get_overlapping_bodies"),&Area::get_overlapping_bodies); ClassDB::bind_method(_MD("get_overlapping_areas"),&Area::get_overlapping_areas); @@ -653,7 +653,7 @@ void Area::_bind_methods() { ADD_PROPERTY( PropertyInfo(Variant::REAL,"linear_damp",PROPERTY_HINT_RANGE,"0,1024,0.001"),_SCS("set_linear_damp"),_SCS("get_linear_damp")); ADD_PROPERTY( PropertyInfo(Variant::REAL,"angular_damp",PROPERTY_HINT_RANGE,"0,1024,0.001"),_SCS("set_angular_damp"),_SCS("get_angular_damp")); ADD_PROPERTY( PropertyInfo(Variant::INT,"priority",PROPERTY_HINT_RANGE,"0,128,1"),_SCS("set_priority"),_SCS("get_priority")); - ADD_PROPERTY( PropertyInfo(Variant::BOOL,"monitoring"),_SCS("set_enable_monitoring"),_SCS("is_monitoring_enabled")); + ADD_PROPERTY( PropertyInfo(Variant::BOOL,"monitoring"),_SCS("set_monitoring"),_SCS("is_monitoring")); ADD_PROPERTY( PropertyInfo(Variant::BOOL,"monitorable"),_SCS("set_monitorable"),_SCS("is_monitorable")); ADD_GROUP("Collision","collision_"); ADD_PROPERTY( PropertyInfo(Variant::INT,"collision_layers",PROPERTY_HINT_LAYERS_3D_PHYSICS),_SCS("set_layer_mask"),_SCS("get_layer_mask")); @@ -676,7 +676,7 @@ Area::Area() : CollisionObject(PhysicsServer::get_singleton()->area_create(),tru collision_mask=1; layer_mask=1; set_ray_pickable(false); - set_enable_monitoring(true); + set_monitoring(true); set_monitorable(true); } diff --git a/scene/3d/area.h b/scene/3d/area.h index 3260bad0a4..7956846505 100644 --- a/scene/3d/area.h +++ b/scene/3d/area.h @@ -153,8 +153,8 @@ public: void set_priority(real_t p_priority); real_t get_priority() const; - void set_enable_monitoring(bool p_enable); - bool is_monitoring_enabled() const; + void set_monitoring(bool p_enable); + bool is_monitoring() const; void set_monitorable(bool p_enable); bool is_monitorable() const; diff --git a/scene/3d/baked_light_instance.cpp b/scene/3d/baked_light_instance.cpp index 59d8d7ecac..e42439bf3b 100644 --- a/scene/3d/baked_light_instance.cpp +++ b/scene/3d/baked_light_instance.cpp @@ -1524,7 +1524,7 @@ void BakedLight::set_cell_subdiv(int p_subdiv) { cell_subdiv=p_subdiv; -// VS::get_singleton()->baked_light_set_subdivision(baked_light,p_subdiv); + //VS::get_singleton()->baked_light_set_subdivision(baked_light,p_subdiv); } int BakedLight::get_cell_subdiv() const { @@ -1745,7 +1745,7 @@ void BakedLight::_bind_methods() { BakedLight::BakedLight() { -// baked_light=VisualServer::get_singleton()->baked_light_create(); + //baked_light=VisualServer::get_singleton()->baked_light_create(); VS::get_singleton()->instance_set_base(get_instance(),baked_light); cell_subdiv=8; @@ -1815,7 +1815,7 @@ void BakedLightSampler::_bind_methods() { ADD_PROPERTYI( PropertyInfo(Variant::REAL,"params/strength",PROPERTY_HINT_RANGE,"0.01,16,0.01"),_SCS("set_param"),_SCS("get_param"),PARAM_STRENGTH); ADD_PROPERTYI( PropertyInfo(Variant::REAL,"params/attenuation",PROPERTY_HINT_EXP_EASING),_SCS("set_param"),_SCS("get_param"),PARAM_ATTENUATION); ADD_PROPERTYI( PropertyInfo(Variant::REAL,"params/detail_ratio",PROPERTY_HINT_RANGE,"0.01,1.0,0.01"),_SCS("set_param"),_SCS("get_param"),PARAM_DETAIL_RATIO); -// ADD_PROPERTYI( PropertyInfo(Variant::REAL,"params/detail_ratio",PROPERTY_HINT_RANGE,"0,20,1"),_SCS("set_param"),_SCS("get_param"),PARAM_DETAIL_RATIO); + //ADD_PROPERTYI( PropertyInfo(Variant::REAL,"params/detail_ratio",PROPERTY_HINT_RANGE,"0,20,1"),_SCS("set_param"),_SCS("get_param"),PARAM_DETAIL_RATIO); ADD_PROPERTY( PropertyInfo(Variant::REAL,"params/resolution",PROPERTY_HINT_RANGE,"4,32,1"),_SCS("set_resolution"),_SCS("get_resolution")); } diff --git a/scene/3d/body_shape.cpp b/scene/3d/body_shape.cpp index ff8b0f15bf..f6ec8639d3 100644 --- a/scene/3d/body_shape.cpp +++ b/scene/3d/body_shape.cpp @@ -96,7 +96,7 @@ void CollisionShape::_update_indicator() { pt = VS::PRIMITIVE_LINES; } else if (shape->cast_to<SphereShape>()) { -// VisualServer *vs=VisualServer::get_singleton(); + //VisualServer *vs=VisualServer::get_singleton(); SphereShape *shapeptr=shape->cast_to<SphereShape>(); @@ -337,7 +337,7 @@ void CollisionShape::_notification(int p_what) { //indicator_instance = VisualServer::get_singleton()->instance_create2(indicator,get_world()->get_scenario()); } break; case NOTIFICATION_TRANSFORM_CHANGED: { - // VisualServer::get_singleton()->instance_set_transform(indicator_instance,get_global_transform()); + //VisualServer::get_singleton()->instance_set_transform(indicator_instance,get_global_transform()); if (can_update_body && updating_body) { _update_body(); } diff --git a/scene/3d/camera.cpp b/scene/3d/camera.cpp index 50ddafc3e4..3f36caf62c 100644 --- a/scene/3d/camera.cpp +++ b/scene/3d/camera.cpp @@ -190,9 +190,11 @@ void Camera::_update_camera() { tr.origin+=tr.basis.get_axis(0)*h_offset; VisualServer::get_singleton()->camera_set_transform( camera, tr ); -// here goes listener stuff -// if (viewport_ptr && is_inside_scene() && is_current()) -// get_viewport()->_camera_transform_changed_notify(); + // here goes listener stuff + /* + if (viewport_ptr && is_inside_scene() && is_current()) + get_viewport()->_camera_transform_changed_notify(); + */ if (is_inside_tree() && is_current()) { get_viewport()->_camera_transform_changed_notify(); @@ -373,7 +375,7 @@ Vector3 Camera::project_local_ray_normal(const Point2& p_pos) const { ray=Vector3(0,0,-1); } else { CameraMatrix cm; - cm.set_perspective(fov,viewport_size.get_aspect(),near,far,keep_aspect==KEEP_WIDTH); + cm.set_perspective(fov,viewport_size.aspect(),near,far,keep_aspect==KEEP_WIDTH); float screen_w,screen_h; cm.get_viewport_size(screen_w,screen_h); ray=Vector3( ((cpos.x/viewport_size.width)*2.0-1.0)*screen_w, ((1.0-(cpos.y/viewport_size.height))*2.0-1.0)*screen_h,-near).normalized(); @@ -400,7 +402,7 @@ Vector3 Camera::project_ray_origin(const Point2& p_pos) const { #endif ERR_FAIL_COND_V( viewport_size.y == 0, Vector3() ); -// float aspect = viewport_size.x / viewport_size.y; + //float aspect = viewport_size.x / viewport_size.y; if (mode == PROJECTION_PERSPECTIVE) { @@ -410,10 +412,10 @@ Vector3 Camera::project_ray_origin(const Point2& p_pos) const { Vector2 pos = cpos / viewport_size; float vsize,hsize; if (keep_aspect==KEEP_WIDTH) { - vsize = size/viewport_size.get_aspect(); + vsize = size/viewport_size.aspect(); hsize = size; } else { - hsize = size*viewport_size.get_aspect(); + hsize = size*viewport_size.aspect(); vsize = size; } @@ -449,9 +451,9 @@ Point2 Camera::unproject_position(const Vector3& p_pos) const { if (mode==PROJECTION_ORTHOGONAL) - cm.set_orthogonal(size,viewport_size.get_aspect(),near,far,keep_aspect==KEEP_WIDTH); + cm.set_orthogonal(size,viewport_size.aspect(),near,far,keep_aspect==KEEP_WIDTH); else - cm.set_perspective(fov,viewport_size.get_aspect(),near,far,keep_aspect==KEEP_WIDTH); + cm.set_perspective(fov,viewport_size.aspect(),near,far,keep_aspect==KEEP_WIDTH); Plane p(get_camera_transform().xform_inv(p_pos),1.0); @@ -479,9 +481,9 @@ Vector3 Camera::project_position(const Point2& p_point) const { CameraMatrix cm; if (mode==PROJECTION_ORTHOGONAL) - cm.set_orthogonal(size,viewport_size.get_aspect(),near,far,keep_aspect==KEEP_WIDTH); + cm.set_orthogonal(size,viewport_size.aspect(),near,far,keep_aspect==KEEP_WIDTH); else - cm.set_perspective(fov,viewport_size.get_aspect(),near,far,keep_aspect==KEEP_WIDTH); + cm.set_perspective(fov,viewport_size.aspect(),near,far,keep_aspect==KEEP_WIDTH); Size2 vp_size; cm.get_viewport_size(vp_size.x,vp_size.y); @@ -628,9 +630,9 @@ Vector<Plane> Camera::get_frustum() const { Size2 viewport_size = get_viewport()->get_visible_rect().size; CameraMatrix cm; if (mode==PROJECTION_PERSPECTIVE) - cm.set_perspective(fov,viewport_size.get_aspect(),near,far,keep_aspect==KEEP_WIDTH); + cm.set_perspective(fov,viewport_size.aspect(),near,far,keep_aspect==KEEP_WIDTH); else - cm.set_orthogonal(size,viewport_size.get_aspect(),near,far,keep_aspect==KEEP_WIDTH); + cm.set_orthogonal(size,viewport_size.aspect(),near,far,keep_aspect==KEEP_WIDTH); return cm.get_projection_planes(get_camera_transform()); diff --git a/scene/3d/collision_object.cpp b/scene/3d/collision_object.cpp index 96d8d13a29..7bba382db0 100644 --- a/scene/3d/collision_object.cpp +++ b/scene/3d/collision_object.cpp @@ -339,7 +339,7 @@ CollisionObject::CollisionObject(RID p_rid, bool p_area) { } else { PhysicsServer::get_singleton()->body_attach_object_instance_ID(rid,get_instance_ID()); } -// set_transform_notify(true); + //set_transform_notify(true); } diff --git a/scene/3d/gi_probe.cpp b/scene/3d/gi_probe.cpp index 13e7c175ed..54d7cb6b9e 100644 --- a/scene/3d/gi_probe.cpp +++ b/scene/3d/gi_probe.cpp @@ -1182,7 +1182,7 @@ void GIProbe::bake(Node *p_from_node, bool p_create_visual_debug){ if (p_create_visual_debug) { - // _create_debug_mesh(&baker); + //_create_debug_mesh(&baker); } diff --git a/scene/3d/mesh_instance.cpp b/scene/3d/mesh_instance.cpp index 66bad45c45..764aff1c08 100644 --- a/scene/3d/mesh_instance.cpp +++ b/scene/3d/mesh_instance.cpp @@ -298,7 +298,7 @@ void MeshInstance::_bind_methods() { ClassDB::bind_method(_MD("get_mesh:Mesh"),&MeshInstance::get_mesh); ClassDB::bind_method(_MD("set_skeleton_path","skeleton_path:NodePath"),&MeshInstance::set_skeleton_path); ClassDB::bind_method(_MD("get_skeleton_path:NodePath"),&MeshInstance::get_skeleton_path); - ClassDB::bind_method(_MD("get_aabb"),&MeshInstance::get_aabb); + ClassDB::bind_method(_MD("create_trimesh_collision"),&MeshInstance::create_trimesh_collision); ClassDB::set_method_flags("MeshInstance","create_trimesh_collision",METHOD_FLAGS_DEFAULT); ClassDB::bind_method(_MD("create_convex_collision"),&MeshInstance::create_convex_collision); diff --git a/scene/3d/navigation.cpp b/scene/3d/navigation.cpp index 40666a60dc..9bb19880bf 100644 --- a/scene/3d/navigation.cpp +++ b/scene/3d/navigation.cpp @@ -368,7 +368,7 @@ Vector<Vector3> Navigation::get_simple_path(const Vector3& p_start, const Vector while(!found_route) { if (open_list.size()==0) { - // print_line("NOU OPEN LIST"); + //print_line("NOU OPEN LIST"); break; } //check open list diff --git a/scene/3d/particles.cpp b/scene/3d/particles.cpp index 9e37658cd9..72fab4cccc 100644 --- a/scene/3d/particles.cpp +++ b/scene/3d/particles.cpp @@ -325,7 +325,7 @@ RES Particles::_get_gizmo_geometry() const { mat->set_parameter( FixedSpatialMaterial::PARAM_EMISSION,Color(0.5,0.7,0.8) ); mat->set_blend_mode( Material::BLEND_MODE_ADD ); mat->set_flag(Material::FLAG_DOUBLE_SIDED,true); -// mat->set_hint(Material::HINT_NO_DEPTH_DRAW,true); + //mat->set_hint(Material::HINT_NO_DEPTH_DRAW,true); surface_tool->begin(Mesh::PRIMITIVE_TRIANGLES); @@ -334,7 +334,7 @@ RES Particles::_get_gizmo_geometry() const { int sides=16; int sections=24; -// float len=1; + //float len=1; float deg=Math::deg2rad(var[VAR_SPREAD]*180); if (deg==180) deg=179.5; diff --git a/scene/3d/physics_body.cpp b/scene/3d/physics_body.cpp index 9235eae643..0a44ad9c3d 100644 --- a/scene/3d/physics_body.cpp +++ b/scene/3d/physics_body.cpp @@ -437,7 +437,7 @@ void RigidBody::_direct_state_changed(Object *p_state) { int local_shape = state->get_contact_local_shape(i); int shape = state->get_contact_collider_shape(i); -// bool found=false; + //bool found=false; Map<ObjectID,BodyState>::Element *E=contact_monitor->body_map.find(obj); if (!E) { @@ -1000,7 +1000,7 @@ Vector3 KinematicBody::move(const Vector3& p_motion) { if (collide_character) mask|=PhysicsDirectSpaceState::TYPE_MASK_CHARACTER_BODY; -// print_line("motion: "+p_motion+" margin: "+rtos(margin)); + //print_line("motion: "+p_motion+" margin: "+rtos(margin)); //print_line("margin: "+rtos(margin)); @@ -1038,10 +1038,10 @@ Vector3 KinematicBody::move(const Vector3& p_motion) { #if 0 float d = a.distance_to(b); - //if (d<margin) - /// continue; - /// - /// + /* + if (d<margin) + continue; + */ recover_motion+=(b-a)*0.2; #else float dist = a.distance_to(b); @@ -1144,7 +1144,7 @@ Vector3 KinematicBody::move(const Vector3& p_motion) { colliding=false; } - // print_line("Rest Travel: "+rest.normal); + //print_line("Rest Travel: "+rest.normal); } @@ -1159,8 +1159,10 @@ Vector3 KinematicBody::move(const Vector3& p_motion) { } Vector3 motion=p_motion*safe; - //if (colliding) - // motion+=normal*0.001; + /* + if (colliding) + motion+=normal*0.001; + */ Transform gt = get_global_transform(); gt.origin+=motion; set_global_transform(gt); diff --git a/scene/3d/proximity_group.cpp b/scene/3d/proximity_group.cpp index 5ef0d3f176..9f4b5c7a03 100644 --- a/scene/3d/proximity_group.cpp +++ b/scene/3d/proximity_group.cpp @@ -135,7 +135,7 @@ void ProximityGroup::broadcast(String p_name, Variant p_params) { E = groups.front(); while (E) { - get_tree()->call_group(SceneTree::GROUP_CALL_DEFAULT, E->key(), "_proximity_group_broadcast", p_name, p_params); + get_tree()->call_group_flags(SceneTree::GROUP_CALL_DEFAULT, E->key(), "_proximity_group_broadcast", p_name, p_params); E = E->next(); }; diff --git a/scene/3d/skeleton.cpp b/scene/3d/skeleton.cpp index 5e576b4960..f2e339604e 100644 --- a/scene/3d/skeleton.cpp +++ b/scene/3d/skeleton.cpp @@ -482,7 +482,7 @@ Transform Skeleton::get_bone_pose(int p_bone) const { void Skeleton::set_bone_custom_pose(int p_bone, const Transform& p_custom_pose) { ERR_FAIL_INDEX( p_bone, bones.size() ); -// ERR_FAIL_COND( !is_inside_scene() ); + //ERR_FAIL_COND( !is_inside_scene() ); bones[p_bone].custom_pose_enable=(p_custom_pose!=Transform()); diff --git a/scene/3d/spatial.cpp b/scene/3d/spatial.cpp index 7c452f90af..6843a7e9b3 100644 --- a/scene/3d/spatial.cpp +++ b/scene/3d/spatial.cpp @@ -95,8 +95,10 @@ void Spatial::_propagate_transform_changed(Spatial *p_origin) { return; } -// if (data.dirty&DIRTY_GLOBAL) -// return; //already dirty + /* + if (data.dirty&DIRTY_GLOBAL) + return; //already dirty + */ data.children_lock++; @@ -179,8 +181,8 @@ void Spatial::_notification(int p_what) { #ifdef TOOLS_ENABLED if (get_tree()->is_editor_hint()) { -// get_scene()->call_group(SceneMainLoop::GROUP_CALL_REALTIME,SceneStringNames::get_singleton()->_spatial_editor_group,SceneStringNames::get_singleton()->_request_gizmo,this); - get_tree()->call_group(0,SceneStringNames::get_singleton()->_spatial_editor_group,SceneStringNames::get_singleton()->_request_gizmo,this); + //get_scene()->call_group(SceneMainLoop::GROUP_CALL_REALTIME,SceneStringNames::get_singleton()->_spatial_editor_group,SceneStringNames::get_singleton()->_request_gizmo,this); + get_tree()->call_group_flags(0,SceneStringNames::get_singleton()->_spatial_editor_group,SceneStringNames::get_singleton()->_request_gizmo,this); if (!data.gizmo_disabled) { if (data.gizmo.is_valid()) @@ -821,7 +823,7 @@ void Spatial::_bind_methods() { ADD_PROPERTY( PropertyInfo(Variant::VECTOR3,"rotation",PROPERTY_HINT_NONE,"",0), _SCS("set_rotation"), _SCS("get_rotation") ); ADD_PROPERTY( PropertyInfo(Variant::VECTOR3,"scale",PROPERTY_HINT_NONE,"",PROPERTY_USAGE_EDITOR), _SCS("set_scale"), _SCS("get_scale") ); ADD_GROUP("Visibility",""); - ADD_PROPERTYNO( PropertyInfo(Variant::BOOL,"visible"), _SCS("_set_visible_"), _SCS("_is_visible_") ); + ADD_PROPERTYNO( PropertyInfo(Variant::BOOL,"visible"), _SCS("set_visible"), _SCS("is_visible") ); //ADD_PROPERTY( PropertyInfo(Variant::TRANSFORM,"transform/local"), _SCS("set_transform"), _SCS("get_transform") ); ADD_SIGNAL( MethodInfo("visibility_changed" ) ); diff --git a/scene/3d/spatial_stream_player.cpp b/scene/3d/spatial_stream_player.cpp index 087e60b48b..1f9765c1d3 100644 --- a/scene/3d/spatial_stream_player.cpp +++ b/scene/3d/spatial_stream_player.cpp @@ -153,10 +153,12 @@ void SpatialStreamPlayer::play(float p_from_offset) { SpatialSoundServer::get_singleton()->source_set_audio_stream(get_source_rid(),&internal_stream); -// AudioServer::get_singleton()->stream_set_active(stream_rid,true); -// AudioServer::get_singleton()->stream_set_volume_scale(stream_rid,volume); -// if (stream->get_update_mode()!=AudioStream::UPDATE_NONE) -// set_idle_process(true); + /* + AudioServer::get_singleton()->stream_set_active(stream_rid,true); + AudioServer::get_singleton()->stream_set_volume_scale(stream_rid,volume); + if (stream->get_update_mode()!=AudioStream::UPDATE_NONE) + set_idle_process(true); + */ } @@ -289,8 +291,10 @@ bool SpatialStreamPlayer::has_autoplay() const { void SpatialStreamPlayer::set_paused(bool p_paused) { paused=p_paused; - //if (stream.is_valid()) - // stream->set_paused(p_paused); + /* + if (stream.is_valid()) + stream->set_paused(p_paused); + */ } bool SpatialStreamPlayer::is_paused() const { diff --git a/scene/3d/sprite_3d.cpp b/scene/3d/sprite_3d.cpp index a2a96d7d0e..9f0c91c4b8 100644 --- a/scene/3d/sprite_3d.cpp +++ b/scene/3d/sprite_3d.cpp @@ -563,8 +563,10 @@ Rect2 Sprite3D::get_item_rect() const { if (texture.is_null()) return Rect2(0,0,1,1); - //if (texture.is_null()) - // return CanvasItem::get_item_rect(); + /* + if (texture.is_null()) + return CanvasItem::get_item_rect(); + */ Size2i s; @@ -1130,7 +1132,7 @@ void AnimatedSprite3D::_notification(int p_what) { //texture->draw_rect(ci,dst_rect,false,modulate); texture->draw_rect_region(ci,dst_rect,Rect2(Vector2(),texture->get_size()),modulate); -// VisualServer::get_singleton()->canvas_item_add_texture_rect_region(ci,dst_rect,texture->get_rid(),src_rect,modulate); + //VisualServer::get_singleton()->canvas_item_add_texture_rect_region(ci,dst_rect,texture->get_rid(),src_rect,modulate); } break; #endif diff --git a/scene/3d/sprite_3d.h b/scene/3d/sprite_3d.h index f5d3957370..a14ce40495 100644 --- a/scene/3d/sprite_3d.h +++ b/scene/3d/sprite_3d.h @@ -185,7 +185,7 @@ public: virtual Rect2 get_item_rect() const; Sprite3D(); -// ~Sprite3D(); + //~Sprite3D(); }; #if 0 @@ -215,7 +215,7 @@ public: virtual Rect2 get_item_rect() const; AnimatedSprite3D(); -// ~AnimatedSprite3D(); + //~AnimatedSprite3D(); }; #endif diff --git a/scene/3d/vehicle_body.cpp b/scene/3d/vehicle_body.cpp index 1cb443225c..a3f05f719d 100644 --- a/scene/3d/vehicle_body.cpp +++ b/scene/3d/vehicle_body.cpp @@ -340,10 +340,11 @@ void VehicleBody::_update_wheel_transform(VehicleWheel& wheel ,PhysicsDirectBody wheel.m_raycastInfo.m_isInContact = false; Transform chassisTrans = s->get_transform(); - //if (interpolatedTransform && (getRigidBody()->getMotionState())) - //{ - // getRigidBody()->getMotionState()->getWorldTransform(chassisTrans); - //} + /* + if (interpolatedTransform && (getRigidBody()->getMotionState())) { + getRigidBody()->getMotionState()->getWorldTransform(chassisTrans); + } + */ wheel.m_raycastInfo.m_hardPointWS = chassisTrans.xform( wheel.m_chassisConnectionPointCS ); //wheel.m_raycastInfo.m_hardPointWS+=s->get_linear_velocity()*s->get_step(); @@ -360,8 +361,8 @@ void VehicleBody::_update_wheel(int p_idx,PhysicsDirectBodyState *s) { const Vector3& right = wheel.m_raycastInfo.m_wheelAxleWS; Vector3 fwd = up.cross(right); fwd = fwd.normalized(); -// up = right.cross(fwd); -// up.normalize(); + //up = right.cross(fwd); + //up.normalize(); //rotate around steering over de wheelAxleWS real_t steering = wheel.steers?m_steeringValue:0.0; @@ -371,8 +372,10 @@ void VehicleBody::_update_wheel(int p_idx,PhysicsDirectBodyState *s) { Basis rotatingMat(right,-wheel.m_rotation); -// if (p_idx==1) -// print_line("steeringMat " +steeringMat); + /* + if (p_idx==1) + print_line("steeringMat " +steeringMat); + */ Basis basis2( right[0],up[0],fwd[0], @@ -502,7 +505,7 @@ void VehicleBody::_update_suspension(PhysicsDirectBodyState *s) if ( wheel_info.m_raycastInfo.m_isInContact ) { real_t force; - // Spring + //Spring { real_t susp_length = wheel_info.m_suspensionRestLength; real_t current_length = wheel_info.m_raycastInfo.m_suspensionLength; diff --git a/scene/3d/vehicle_body.h b/scene/3d/vehicle_body.h index cd627f8998..273e63d741 100644 --- a/scene/3d/vehicle_body.h +++ b/scene/3d/vehicle_body.h @@ -63,7 +63,7 @@ friend class VehicleBody; VehicleBody *body; -// btVector3 m_wheelAxleCS; // const or modified by steering ? + //btVector3 m_wheelAxleCS; // const or modified by steering ? real_t m_steering; real_t m_rotation; diff --git a/scene/3d/visual_instance.cpp b/scene/3d/visual_instance.cpp index ca78f8e21f..ec37aa2bc4 100644 --- a/scene/3d/visual_instance.cpp +++ b/scene/3d/visual_instance.cpp @@ -102,7 +102,7 @@ void VisualInstance::_notification(int p_what) { VisualServer::get_singleton()->instance_set_scenario( instance, RID() ); VisualServer::get_singleton()->instance_set_room(instance,RID()); VisualServer::get_singleton()->instance_attach_skeleton( instance, RID() ); - // VS::get_singleton()->instance_geometry_set_baked_light_sampler(instance, RID() ); + //VS::get_singleton()->instance_geometry_set_baked_light_sampler(instance, RID() ); } break; case NOTIFICATION_VISIBILITY_CHANGED: { @@ -368,7 +368,7 @@ void GeometryInstance::_bind_methods() { ADD_PROPERTY( PropertyInfo( Variant::INT, "lod_max_distance",PROPERTY_HINT_RANGE,"0,32768,0.01"), _SCS("set_lod_max_distance"), _SCS("get_lod_max_distance")); ADD_PROPERTY( PropertyInfo( Variant::INT, "lod_max_hysteresis",PROPERTY_HINT_RANGE,"0,32768,0.01"), _SCS("set_lod_max_hysteresis"), _SCS("get_lod_max_hysteresis")); -// ADD_SIGNAL( MethodInfo("visibility_changed")); + //ADD_SIGNAL( MethodInfo("visibility_changed")); BIND_CONSTANT(FLAG_CAST_SHADOW ); BIND_CONSTANT(FLAG_BILLBOARD ); @@ -399,7 +399,7 @@ GeometryInstance::GeometryInstance() { shadow_casting_setting=SHADOW_CASTING_SETTING_ON; extra_cull_margin=0; -// VS::get_singleton()->instance_geometry_set_baked_light_texture_index(get_instance(),0); + //VS::get_singleton()->instance_geometry_set_baked_light_texture_index(get_instance(),0); } |