summaryrefslogtreecommitdiff
path: root/scene/3d
diff options
context:
space:
mode:
Diffstat (limited to 'scene/3d')
-rw-r--r--scene/3d/SCsub2
-rw-r--r--scene/3d/immediate_geometry.h2
-rw-r--r--scene/3d/light.cpp6
-rw-r--r--scene/3d/vehicle_body.cpp7
-rw-r--r--scene/3d/vehicle_body.h2
5 files changed, 17 insertions, 2 deletions
diff --git a/scene/3d/SCsub b/scene/3d/SCsub
index 90e78ba8d3..72739b527e 100644
--- a/scene/3d/SCsub
+++ b/scene/3d/SCsub
@@ -3,7 +3,7 @@
Import('env')
-if (env["disable_3d"] == "yes"):
+if env['disable_3d']:
env.scene_sources.append("3d/spatial.cpp")
env.scene_sources.append("3d/skeleton.cpp")
diff --git a/scene/3d/immediate_geometry.h b/scene/3d/immediate_geometry.h
index 6db825bf54..93ef726c6d 100644
--- a/scene/3d/immediate_geometry.h
+++ b/scene/3d/immediate_geometry.h
@@ -38,7 +38,7 @@ class ImmediateGeometry : public GeometryInstance {
GDCLASS(ImmediateGeometry, GeometryInstance);
RID im;
- //a list of texures drawn need to be kept, to avoid references
+ //a list of textures drawn need to be kept, to avoid references
// in VisualServer from becoming invalid if the texture is no longer used
List<Ref<Texture> > cached_textures;
bool empty;
diff --git a/scene/3d/light.cpp b/scene/3d/light.cpp
index 7402e664d9..b7cd9bd2dc 100644
--- a/scene/3d/light.cpp
+++ b/scene/3d/light.cpp
@@ -369,6 +369,12 @@ DirectionalLight::DirectionalLight()
set_shadow_depth_range(SHADOW_DEPTH_RANGE_STABLE);
blend_splits = false;
+
+#ifdef TOOLS_ENABLED
+ if (Engine::get_singleton()->is_editor_hint())
+ // Create light with a default natural "sun" orientation in editor, instead of looking horizontally on X
+ set_rotation_in_degrees(Vector3(-50, 25, 30));
+#endif
}
void OmniLight::set_shadow_mode(ShadowMode p_mode) {
diff --git a/scene/3d/vehicle_body.cpp b/scene/3d/vehicle_body.cpp
index 3518113130..a072572142 100644
--- a/scene/3d/vehicle_body.cpp
+++ b/scene/3d/vehicle_body.cpp
@@ -267,6 +267,8 @@ void VehicleWheel::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_roll_influence", "roll_influence"), &VehicleWheel::set_roll_influence);
ClassDB::bind_method(D_METHOD("get_roll_influence"), &VehicleWheel::get_roll_influence);
+ ClassDB::bind_method(D_METHOD("get_skidinfo"), &VehicleWheel::get_skidinfo);
+
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "use_as_traction"), "set_use_as_traction", "is_used_as_traction");
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "use_as_steering"), "set_use_as_steering", "is_used_as_steering");
ADD_GROUP("Wheel", "wheel_");
@@ -303,6 +305,11 @@ bool VehicleWheel::is_used_as_steering() const {
return steers;
}
+float VehicleWheel::get_skidinfo() const {
+
+ return m_skidInfo;
+}
+
VehicleWheel::VehicleWheel() {
steers = false;
diff --git a/scene/3d/vehicle_body.h b/scene/3d/vehicle_body.h
index eb661adb90..c642eb61b8 100644
--- a/scene/3d/vehicle_body.h
+++ b/scene/3d/vehicle_body.h
@@ -131,6 +131,8 @@ public:
void set_roll_influence(float p_value);
float get_roll_influence() const;
+ float get_skidinfo() const;
+
String get_configuration_warning() const;
VehicleWheel();