summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--doc/classes/KinematicBody.xml2
-rw-r--r--doc/classes/KinematicBody2D.xml2
-rw-r--r--drivers/gles3/rasterizer_scene_gles3.cpp6
-rw-r--r--editor/editor_fonts.cpp2
-rw-r--r--editor/plugins/canvas_item_editor_plugin.cpp10
-rw-r--r--scene/3d/skeleton.cpp2
6 files changed, 17 insertions, 7 deletions
diff --git a/doc/classes/KinematicBody.xml b/doc/classes/KinematicBody.xml
index ad41f48ddd..a4fade6ab2 100644
--- a/doc/classes/KinematicBody.xml
+++ b/doc/classes/KinematicBody.xml
@@ -89,7 +89,7 @@
</argument>
<description>
Moves the body along a vector. If the body collides with another, it will slide along the other body rather than stop immediately. If the other body is a [code]KinematicBody[/code] or [RigidBody], it will also be affected by the motion of the other body. You can use this to make moving or rotating platforms, or to make nodes push other nodes.
- [code]linear_velocity[/code] is a value in pixels per second. Unlike in for example [method move_and_collide], you should [i]not[/i] multiply it by [code]delta[/code] — this is done by the method.
+ [code]linear_velocity[/code] is the velocity vector (typically meters per second). Unlike in [method move_and_collide], you should [i]not[/i] multiply it by [code]delta[/code] — the physics engine handles applying the velocity.
[code]floor_normal[/code] is the up direction, used to determine what is a wall and what is a floor or a ceiling. If set to the default value of [code]Vector3(0, 0, 0)[/code], everything is considered a wall. This is useful for topdown games.
[i]TODO: Update for new stop_on_slode argument.[/i] If the body is standing on a slope and the horizontal speed (relative to the floor's speed) goes below [code]slope_stop_min_velocity[/code], the body will stop completely. This prevents the body from sliding down slopes when you include gravity in [code]linear_velocity[/code]. When set to lower values, the body will not be able to stand still on steep slopes.
If the body collides, it will change direction a maximum of [code]max_slides[/code] times before it stops.
diff --git a/doc/classes/KinematicBody2D.xml b/doc/classes/KinematicBody2D.xml
index 986010f832..b94304b9a8 100644
--- a/doc/classes/KinematicBody2D.xml
+++ b/doc/classes/KinematicBody2D.xml
@@ -89,7 +89,7 @@
</argument>
<description>
Moves the body along a vector. If the body collides with another, it will slide along the other body rather than stop immediately. If the other body is a [code]KinematicBody2D[/code] or [RigidBody2D], it will also be affected by the motion of the other body. You can use this to make moving or rotating platforms, or to make nodes push other nodes.
- [code]linear_velocity[/code] is a value in pixels per second. Unlike in for example [method move_and_collide], you should [i]not[/i] multiply it by [code]delta[/code] — this is done by the method.
+ [code]linear_velocity[/code] is the velocity vector in pixels per second. Unlike in [method move_and_collide], you should [i]not[/i] multiply it by [code]delta[/code] — the physics engine handles applying the velocity.
[code]floor_normal[/code] is the up direction, used to determine what is a wall and what is a floor or a ceiling. If set to the default value of [code]Vector2(0, 0)[/code], everything is considered a wall. This is useful for topdown games.
[i]TODO: Update for stop_on_slope argument.[/i] If the body is standing on a slope and the horizontal speed (relative to the floor's speed) goes below [code]slope_stop_min_velocity[/code], the body will stop completely. This prevents the body from sliding down slopes when you include gravity in [code]linear_velocity[/code]. When set to lower values, the body will not be able to stand still on steep slopes.
If the body collides, it will change direction a maximum of [code]max_slides[/code] times before it stops.
diff --git a/drivers/gles3/rasterizer_scene_gles3.cpp b/drivers/gles3/rasterizer_scene_gles3.cpp
index d1d063ad5b..d53b27eb88 100644
--- a/drivers/gles3/rasterizer_scene_gles3.cpp
+++ b/drivers/gles3/rasterizer_scene_gles3.cpp
@@ -2680,8 +2680,10 @@ void RasterizerSceneGLES3::_setup_environment(Environment *env, const CameraMatr
// Drop -O3 for this function as it triggers a GCC bug up until at least GCC 8.2.1.
// This refers to GH issue #19633.
// The bug has been reported to the GCC project.
+#if defined(__GNUC__) && !defined(__clang__)
#pragma GCC push_options
-#pragma GCC optimize ("-O2")
+#pragma GCC optimize("-O2")
+#endif
void RasterizerSceneGLES3::_setup_directional_light(int p_index, const Transform &p_camera_inverse_transform, bool p_use_shadows) {
LightInstance *li = directional_lights[p_index];
@@ -2799,7 +2801,9 @@ void RasterizerSceneGLES3::_setup_directional_light(int p_index, const Transform
glBindBufferBase(GL_UNIFORM_BUFFER, 3, state.directional_ubo);
}
+#if defined(__GNUC__) && !defined(__clang__)
#pragma GCC pop_options
+#endif
void RasterizerSceneGLES3::_setup_lights(RID *p_light_cull_result, int p_light_cull_count, const Transform &p_camera_inverse_transform, const CameraMatrix &p_camera_projection, RID p_shadow_atlas) {
diff --git a/editor/editor_fonts.cpp b/editor/editor_fonts.cpp
index d0e7cda6b6..fa4172cded 100644
--- a/editor/editor_fonts.cpp
+++ b/editor/editor_fonts.cpp
@@ -242,6 +242,6 @@ void editor_register_fonts(Ref<Theme> p_theme) {
MAKE_SOURCE_FONT(df_output_code, int(EDITOR_DEF("run/output/font_size", 13)) * EDSCALE);
p_theme->set_font("output_source", "EditorFonts", df_output_code);
- MAKE_SOURCE_FONT(df_text_editor_status_code, 14 * EDSCALE);
+ MAKE_SOURCE_FONT(df_text_editor_status_code, default_font_size);
p_theme->set_font("status_source", "EditorFonts", df_text_editor_status_code);
}
diff --git a/editor/plugins/canvas_item_editor_plugin.cpp b/editor/plugins/canvas_item_editor_plugin.cpp
index 86d6799b19..02f6263887 100644
--- a/editor/plugins/canvas_item_editor_plugin.cpp
+++ b/editor/plugins/canvas_item_editor_plugin.cpp
@@ -2738,8 +2738,14 @@ void CanvasItemEditor::_draw_selection() {
if (single && (tool == TOOL_SELECT || tool == TOOL_MOVE || tool == TOOL_SCALE || tool == TOOL_ROTATE || tool == TOOL_EDIT_PIVOT)) { //kind of sucks
// Draw the pivot
- if (canvas_item->_edit_get_pivot() != Vector2() || drag_type == DRAG_PIVOT || tool == TOOL_EDIT_PIVOT) { // This is not really clean :/
- viewport->draw_texture(pivot_icon, (xform.xform(canvas_item->_edit_get_pivot()) - (pivot_icon->get_size() / 2)).floor());
+ if (canvas_item->_edit_use_pivot()) {
+
+ // Draw the node's pivot
+ Transform2D unscaled_transform = (xform * canvas_item->get_transform().affine_inverse() * Transform2D(canvas_item->_edit_get_rotation(), canvas_item->_edit_get_position())).orthonormalized();
+ Transform2D simple_xform = viewport->get_transform() * unscaled_transform;
+ viewport->draw_set_transform_matrix(simple_xform);
+ viewport->draw_texture(pivot_icon, canvas_item->_edit_get_pivot() - (pivot_icon->get_size() / 2).floor());
+ viewport->draw_set_transform_matrix(viewport->get_transform());
}
// Draw control-related helpers
diff --git a/scene/3d/skeleton.cpp b/scene/3d/skeleton.cpp
index 0db2250a3a..8caf4e8e39 100644
--- a/scene/3d/skeleton.cpp
+++ b/scene/3d/skeleton.cpp
@@ -320,7 +320,7 @@ void Skeleton::_notification(int p_what) {
}
b.transform_final = b.pose_global * b.rest_global_inverse;
- vs->skeleton_bone_set_transform(skeleton, i, global_transform * (b.transform_final * global_transform_inverse));
+ vs->skeleton_bone_set_transform(skeleton, order[i], global_transform * (b.transform_final * global_transform_inverse));
for (List<uint32_t>::Element *E = b.nodes_bound.front(); E; E = E->next()) {