diff options
author | AndreaCatania <info@andreacatania.com> | 2017-11-21 22:56:40 +0100 |
---|---|---|
committer | AndreaCatania <info@andreacatania.com> | 2017-11-21 22:56:40 +0100 |
commit | d6e413bb9cb91255014cddacdba1591e14df56dd (patch) | |
tree | 39977ef56522b32e12c62aaa6eeb6117bdc5f692 /scene/3d | |
parent | 20b07a1fb55c31d326c3f9c36d1276eb1bcf15e6 (diff) |
Removed type_mask and fixed some variable name
Diffstat (limited to 'scene/3d')
-rw-r--r-- | scene/3d/audio_stream_player_3d.cpp | 2 | ||||
-rw-r--r-- | scene/3d/ray_cast.cpp | 17 | ||||
-rw-r--r-- | scene/3d/ray_cast.h | 4 |
3 files changed, 2 insertions, 21 deletions
diff --git a/scene/3d/audio_stream_player_3d.cpp b/scene/3d/audio_stream_player_3d.cpp index ad1a15f363..30b7f36352 100644 --- a/scene/3d/audio_stream_player_3d.cpp +++ b/scene/3d/audio_stream_player_3d.cpp @@ -242,7 +242,7 @@ void AudioStreamPlayer3D::_notification(int p_what) { PhysicsDirectSpaceState::ShapeResult sr[MAX_INTERSECT_AREAS]; - int areas = space_state->intersect_point(global_pos, sr, MAX_INTERSECT_AREAS, Set<RID>(), area_mask, PhysicsDirectSpaceState::TYPE_MASK_AREA); + int areas = space_state->intersect_point(global_pos, sr, MAX_INTERSECT_AREAS, Set<RID>(), area_mask); Area *area = NULL; for (int i = 0; i < areas; i++) { diff --git a/scene/3d/ray_cast.cpp b/scene/3d/ray_cast.cpp index 9f61cc64ea..aebdcaf183 100644 --- a/scene/3d/ray_cast.cpp +++ b/scene/3d/ray_cast.cpp @@ -58,11 +58,6 @@ uint32_t RayCast::get_collision_mask() const { return collision_mask; } -void RayCast::set_type_mask(uint32_t p_mask) { - - type_mask = p_mask; -} - void RayCast::set_collision_mask_bit(int p_bit, bool p_value) { uint32_t mask = get_collision_mask(); @@ -78,11 +73,6 @@ bool RayCast::get_collision_mask_bit(int p_bit) const { return get_collision_mask() & (1 << p_bit); } -uint32_t RayCast::get_type_mask() const { - - return type_mask; -} - bool RayCast::is_colliding() const { return collided; @@ -187,7 +177,7 @@ void RayCast::_update_raycast_state() { PhysicsDirectSpaceState::RayResult rr; - if (dss->intersect_ray(gt.get_origin(), gt.xform(to), rr, exclude, collision_mask, type_mask)) { + if (dss->intersect_ray(gt.get_origin(), gt.xform(to), rr, exclude, collision_mask)) { collided = true; against = rr.collider_id; @@ -266,13 +256,9 @@ void RayCast::_bind_methods() { ClassDB::bind_method(D_METHOD("set_collision_mask_bit", "bit", "value"), &RayCast::set_collision_mask_bit); ClassDB::bind_method(D_METHOD("get_collision_mask_bit", "bit"), &RayCast::get_collision_mask_bit); - ClassDB::bind_method(D_METHOD("set_type_mask", "mask"), &RayCast::set_type_mask); - ClassDB::bind_method(D_METHOD("get_type_mask"), &RayCast::get_type_mask); - ADD_PROPERTY(PropertyInfo(Variant::BOOL, "enabled"), "set_enabled", "is_enabled"); ADD_PROPERTY(PropertyInfo(Variant::VECTOR3, "cast_to"), "set_cast_to", "get_cast_to"); ADD_PROPERTY(PropertyInfo(Variant::INT, "collision_mask", PROPERTY_HINT_LAYERS_3D_PHYSICS), "set_collision_mask", "get_collision_mask"); - ADD_PROPERTY(PropertyInfo(Variant::INT, "type_mask", PROPERTY_HINT_FLAGS, "Static,Kinematic,Rigid,Character,Area"), "set_type_mask", "get_type_mask"); } void RayCast::_create_debug_shape() { @@ -344,7 +330,6 @@ RayCast::RayCast() { collided = false; against_shape = 0; collision_mask = 1; - type_mask = PhysicsDirectSpaceState::TYPE_MASK_COLLISION; cast_to = Vector3(0, -1, 0); debug_shape = NULL; } diff --git a/scene/3d/ray_cast.h b/scene/3d/ray_cast.h index cac1596264..ca94580271 100644 --- a/scene/3d/ray_cast.h +++ b/scene/3d/ray_cast.h @@ -48,7 +48,6 @@ class RayCast : public Spatial { Set<RID> exclude; uint32_t collision_mask; - uint32_t type_mask; Node *debug_shape; Ref<Material> debug_material; @@ -75,9 +74,6 @@ public: void set_collision_mask_bit(int p_bit, bool p_value); bool get_collision_mask_bit(int p_bit) const; - void set_type_mask(uint32_t p_mask); - uint32_t get_type_mask() const; - void force_raycast_update(); bool is_colliding() const; Object *get_collider() const; |