summaryrefslogtreecommitdiff
path: root/servers/physics_2d/collision_object_2d_sw.h
diff options
context:
space:
mode:
authorPouleyKetchoupp <pouleyketchoup@gmail.com>2021-09-30 10:45:36 -0700
committerPouleyKetchoupp <pouleyketchoup@gmail.com>2021-09-30 10:45:36 -0700
commitd0ec46be682ef262c4d2518fd15237df0261f67b (patch)
tree2bc86f59f092e5bbffa5a290b83ad29b1310f427 /servers/physics_2d/collision_object_2d_sw.h
parent767bde8c28fb09fb1e08f94d8b67076d4b7c4085 (diff)
Remove shape metadata from 2D physics server
Shape metadata was only used to get tile information when colliding with tilemaps. It's not needed anymore since there's an API in tilemap using body ids instead.
Diffstat (limited to 'servers/physics_2d/collision_object_2d_sw.h')
-rw-r--r--servers/physics_2d/collision_object_2d_sw.h6
1 files changed, 0 insertions, 6 deletions
diff --git a/servers/physics_2d/collision_object_2d_sw.h b/servers/physics_2d/collision_object_2d_sw.h
index 69487631a6..ca258a906a 100644
--- a/servers/physics_2d/collision_object_2d_sw.h
+++ b/servers/physics_2d/collision_object_2d_sw.h
@@ -58,7 +58,6 @@ private:
BroadPhase2DSW::ID bpid = 0;
Rect2 aabb_cache; //for rayqueries
Shape2DSW *shape = nullptr;
- Variant metadata;
bool disabled = false;
bool one_way_collision = false;
real_t one_way_collision_margin = 0.0;
@@ -110,7 +109,6 @@ public:
void add_shape(Shape2DSW *p_shape, const Transform2D &p_transform = Transform2D(), bool p_disabled = false);
void set_shape(int p_index, Shape2DSW *p_shape);
void set_shape_transform(int p_index, const Transform2D &p_transform);
- void set_shape_metadata(int p_index, const Variant &p_metadata);
_FORCE_INLINE_ int get_shape_count() const { return shapes.size(); }
_FORCE_INLINE_ Shape2DSW *get_shape(int p_index) const {
@@ -129,10 +127,6 @@ public:
CRASH_BAD_INDEX(p_index, shapes.size());
return shapes[p_index].aabb_cache;
}
- _FORCE_INLINE_ const Variant &get_shape_metadata(int p_index) const {
- CRASH_BAD_INDEX(p_index, shapes.size());
- return shapes[p_index].metadata;
- }
_FORCE_INLINE_ const Transform2D &get_transform() const { return transform; }
_FORCE_INLINE_ const Transform2D &get_inv_transform() const { return inv_transform; }