diff options
Diffstat (limited to 'servers/physics_2d/godot_space_2d.cpp')
-rw-r--r-- | servers/physics_2d/godot_space_2d.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/servers/physics_2d/godot_space_2d.cpp b/servers/physics_2d/godot_space_2d.cpp index 8b75d8cde4..3ff7ab86bb 100644 --- a/servers/physics_2d/godot_space_2d.cpp +++ b/servers/physics_2d/godot_space_2d.cpp @@ -633,7 +633,7 @@ bool GodotSpace2D::test_body_motion(GodotBody2D *p_body, const PhysicsServer2D:: Transform2D col_obj_shape_xform = col_obj->get_transform() * col_obj->get_shape_transform(shape_idx); if (body_shape->allows_one_way_collision() && col_obj->is_shape_set_as_one_way_collision(shape_idx)) { - cbk.valid_dir = col_obj_shape_xform.get_axis(1).normalized(); + cbk.valid_dir = col_obj_shape_xform.columns[1].normalized(); real_t owc_margin = col_obj->get_shape_one_way_collision_margin(shape_idx); cbk.valid_depth = MAX(owc_margin, margin); //user specified, but never less than actual margin or it won't work @@ -788,7 +788,7 @@ bool GodotSpace2D::test_body_motion(GodotBody2D *p_body, const PhysicsServer2D:: //test initial overlap if (GodotCollisionSolver2D::solve(body_shape, body_shape_xform, Vector2(), against_shape, col_obj_shape_xform, Vector2(), nullptr, nullptr, nullptr, 0)) { if (body_shape->allows_one_way_collision() && col_obj->is_shape_set_as_one_way_collision(col_shape_idx)) { - Vector2 direction = col_obj_shape_xform.get_axis(1).normalized(); + Vector2 direction = col_obj_shape_xform.columns[1].normalized(); if (motion_normal.dot(direction) < 0) { continue; } @@ -838,7 +838,7 @@ bool GodotSpace2D::test_body_motion(GodotBody2D *p_body, const PhysicsServer2D:: cbk.amount = 0; cbk.passed = 0; cbk.ptr = cd; - cbk.valid_dir = col_obj_shape_xform.get_axis(1).normalized(); + cbk.valid_dir = col_obj_shape_xform.columns[1].normalized(); cbk.valid_depth = 10e20; @@ -929,7 +929,7 @@ bool GodotSpace2D::test_body_motion(GodotBody2D *p_body, const PhysicsServer2D:: Transform2D col_obj_shape_xform = col_obj->get_transform() * col_obj->get_shape_transform(shape_idx); if (body_shape->allows_one_way_collision() && col_obj->is_shape_set_as_one_way_collision(shape_idx)) { - rcd.valid_dir = col_obj_shape_xform.get_axis(1).normalized(); + rcd.valid_dir = col_obj_shape_xform.columns[1].normalized(); real_t owc_margin = col_obj->get_shape_one_way_collision_margin(shape_idx); rcd.valid_depth = MAX(owc_margin, margin); //user specified, but never less than actual margin or it won't work |