summaryrefslogtreecommitdiff
path: root/servers/physics_3d/godot_soft_body_3d.h
diff options
context:
space:
mode:
authorPouleyKetchoupp <pouleyketchoup@gmail.com>2021-11-10 15:57:11 -0700
committerPouleyKetchoupp <pouleyketchoup@gmail.com>2021-11-10 17:43:35 -0700
commitc3ae7ddedd8526fff273237cb61ebb866a723af5 (patch)
tree9260e8a42f83ed33921f5de3f8be6bd5c9ccfa68 /servers/physics_3d/godot_soft_body_3d.h
parent3668312e786d0e06fee627e5255edef88710cc9b (diff)
Add raycast options to hit when starting inside / hit back faces
Makes the results consistent for all shape types with options to set the desired behavior.
Diffstat (limited to 'servers/physics_3d/godot_soft_body_3d.h')
-rw-r--r--servers/physics_3d/godot_soft_body_3d.h24
1 files changed, 12 insertions, 12 deletions
diff --git a/servers/physics_3d/godot_soft_body_3d.h b/servers/physics_3d/godot_soft_body_3d.h
index 008d5dddb8..b42fefee62 100644
--- a/servers/physics_3d/godot_soft_body_3d.h
+++ b/servers/physics_3d/godot_soft_body_3d.h
@@ -257,18 +257,18 @@ class GodotSoftBodyShape3D : public GodotShape3D {
public:
GodotSoftBody3D *get_soft_body() const { return soft_body; }
- virtual PhysicsServer3D::ShapeType get_type() const { return PhysicsServer3D::SHAPE_SOFT_BODY; }
- virtual void project_range(const Vector3 &p_normal, const Transform3D &p_transform, real_t &r_min, real_t &r_max) const { r_min = r_max = 0.0; }
- virtual Vector3 get_support(const Vector3 &p_normal) const { return Vector3(); }
- virtual void get_supports(const Vector3 &p_normal, int p_max, Vector3 *r_supports, int &r_amount, FeatureType &r_type) const { r_amount = 0; }
-
- virtual bool intersect_segment(const Vector3 &p_begin, const Vector3 &p_end, Vector3 &r_result, Vector3 &r_normal) const;
- virtual bool intersect_point(const Vector3 &p_point) const;
- virtual Vector3 get_closest_point_to(const Vector3 &p_point) const;
- virtual Vector3 get_moment_of_inertia(real_t p_mass) const { return Vector3(); }
-
- virtual void set_data(const Variant &p_data) {}
- virtual Variant get_data() const { return Variant(); }
+ virtual PhysicsServer3D::ShapeType get_type() const override { return PhysicsServer3D::SHAPE_SOFT_BODY; }
+ virtual void project_range(const Vector3 &p_normal, const Transform3D &p_transform, real_t &r_min, real_t &r_max) const override { r_min = r_max = 0.0; }
+ virtual Vector3 get_support(const Vector3 &p_normal) const override { return Vector3(); }
+ virtual void get_supports(const Vector3 &p_normal, int p_max, Vector3 *r_supports, int &r_amount, FeatureType &r_type) const override { r_amount = 0; }
+
+ virtual bool intersect_segment(const Vector3 &p_begin, const Vector3 &p_end, Vector3 &r_result, Vector3 &r_normal, bool p_hit_back_faces) const override;
+ virtual bool intersect_point(const Vector3 &p_point) const override;
+ virtual Vector3 get_closest_point_to(const Vector3 &p_point) const override;
+ virtual Vector3 get_moment_of_inertia(real_t p_mass) const override { return Vector3(); }
+
+ virtual void set_data(const Variant &p_data) override {}
+ virtual Variant get_data() const override { return Variant(); }
void update_bounds();