summaryrefslogtreecommitdiff
path: root/servers/physics_server.h
diff options
context:
space:
mode:
authorAndrea Catania <info@andreacatania.com>2018-08-14 19:20:48 +0200
committerAndrea Catania <info@andreacatania.com>2018-08-19 13:45:23 +0200
commit0010d9c82a89e89fc1bc83e806f59f34f3deb893 (patch)
treeaade002a85aa3d8343210ddbcaa61e3049075fec /servers/physics_server.h
parent9826456f2e78b3502f646ffa5445c76c6d31f7ea (diff)
Added ray shape and move_and_slide with snapping on 3D.
Added stop_on_slope on 2d part
Diffstat (limited to 'servers/physics_server.h')
-rw-r--r--servers/physics_server.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/servers/physics_server.h b/servers/physics_server.h
index 948aec1a2d..982fcd68e3 100644
--- a/servers/physics_server.h
+++ b/servers/physics_server.h
@@ -484,6 +484,21 @@ public:
virtual bool body_test_motion(RID p_body, const Transform &p_from, const Vector3 &p_motion, bool p_infinite_inertia, MotionResult *r_result = NULL) = 0;
+ struct SeparationResult {
+
+ float collision_depth;
+ Vector3 collision_point;
+ Vector3 collision_normal;
+ Vector3 collider_velocity;
+ int collision_local_shape;
+ ObjectID collider_id;
+ RID collider;
+ int collider_shape;
+ Variant collider_metadata;
+ };
+
+ virtual int body_test_ray_separation(RID p_body, const Transform &p_transform, bool p_infinite_inertia, Vector3 &r_recover_motion, SeparationResult *r_results, int p_result_max, float p_margin = 0.001) = 0;
+
/* SOFT BODY */
virtual RID soft_body_create(bool p_init_sleeping = false) = 0;