feat: updated engine version to 4.4-rc1
This commit is contained in:
parent
ee00efde1f
commit
21ba8e33af
5459 changed files with 1128836 additions and 198305 deletions
|
|
@ -30,7 +30,6 @@
|
|||
|
||||
#include "shape_cast_3d.h"
|
||||
|
||||
#include "scene/3d/mesh_instance_3d.h"
|
||||
#include "scene/3d/physics/collision_object_3d.h"
|
||||
#include "scene/resources/3d/concave_polygon_shape_3d.h"
|
||||
|
||||
|
|
@ -157,7 +156,7 @@ void ShapeCast3D::_bind_methods() {
|
|||
ClassDB::bind_method(D_METHOD("set_collide_with_bodies", "enable"), &ShapeCast3D::set_collide_with_bodies);
|
||||
ClassDB::bind_method(D_METHOD("is_collide_with_bodies_enabled"), &ShapeCast3D::is_collide_with_bodies_enabled);
|
||||
|
||||
ClassDB::bind_method(D_METHOD("_get_collision_result"), &ShapeCast3D::_get_collision_result);
|
||||
ClassDB::bind_method(D_METHOD("get_collision_result"), &ShapeCast3D::get_collision_result);
|
||||
|
||||
ClassDB::bind_method(D_METHOD("set_debug_shape_custom_color", "debug_shape_custom_color"), &ShapeCast3D::set_debug_shape_custom_color);
|
||||
ClassDB::bind_method(D_METHOD("get_debug_shape_custom_color"), &ShapeCast3D::get_debug_shape_custom_color);
|
||||
|
|
@ -169,7 +168,7 @@ void ShapeCast3D::_bind_methods() {
|
|||
ADD_PROPERTY(PropertyInfo(Variant::FLOAT, "margin", PROPERTY_HINT_RANGE, "0,100,0.01,suffix:m"), "set_margin", "get_margin");
|
||||
ADD_PROPERTY(PropertyInfo(Variant::INT, "max_results"), "set_max_results", "get_max_results");
|
||||
ADD_PROPERTY(PropertyInfo(Variant::INT, "collision_mask", PROPERTY_HINT_LAYERS_3D_PHYSICS), "set_collision_mask", "get_collision_mask");
|
||||
ADD_PROPERTY(PropertyInfo(Variant::ARRAY, "collision_result", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NO_EDITOR), "", "_get_collision_result");
|
||||
ADD_PROPERTY(PropertyInfo(Variant::ARRAY, "collision_result", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NO_EDITOR), "", "get_collision_result");
|
||||
|
||||
ADD_GROUP("Collide With", "collide_with");
|
||||
ADD_PROPERTY(PropertyInfo(Variant::BOOL, "collide_with_areas", PROPERTY_HINT_LAYERS_3D_PHYSICS), "set_collide_with_areas", "is_collide_with_areas_enabled");
|
||||
|
|
@ -475,7 +474,7 @@ bool ShapeCast3D::is_collide_with_bodies_enabled() const {
|
|||
return collide_with_bodies;
|
||||
}
|
||||
|
||||
Array ShapeCast3D::_get_collision_result() const {
|
||||
Array ShapeCast3D::get_collision_result() const {
|
||||
Array ret;
|
||||
|
||||
for (int i = 0; i < result.size(); ++i) {
|
||||
|
|
@ -499,7 +498,7 @@ void ShapeCast3D::_update_debug_shape_vertices() {
|
|||
debug_shape_vertices.clear();
|
||||
debug_line_vertices.clear();
|
||||
|
||||
if (!shape.is_null()) {
|
||||
if (shape.is_valid()) {
|
||||
debug_shape_vertices.append_array(shape->get_debug_mesh_lines());
|
||||
for (int i = 0; i < debug_shape_vertices.size(); i++) {
|
||||
debug_shape_vertices.set(i, debug_shape_vertices[i] + Vector3(target_position * get_closest_collision_safe_fraction()));
|
||||
|
|
@ -546,12 +545,12 @@ void ShapeCast3D::_create_debug_shape() {
|
|||
}
|
||||
|
||||
if (debug_mesh.is_null()) {
|
||||
debug_mesh = Ref<ArrayMesh>(memnew(ArrayMesh));
|
||||
debug_mesh.instantiate();
|
||||
}
|
||||
}
|
||||
|
||||
void ShapeCast3D::_update_debug_shape_material(bool p_check_collision) {
|
||||
if (!debug_material.is_valid()) {
|
||||
if (debug_material.is_null()) {
|
||||
Ref<StandardMaterial3D> material = memnew(StandardMaterial3D);
|
||||
debug_material = material;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue