From e7122195226fc9fc5a4a942b4b12713345b34666 Mon Sep 17 00:00:00 2001 From: Jan Nils Ferner Date: Tue, 24 Jan 2023 03:13:24 +0100 Subject: Add wall to test #426 --- examples2d/character_controller2.rs | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'examples2d') diff --git a/examples2d/character_controller2.rs b/examples2d/character_controller2.rs index ff500e9..4df9f51 100644 --- a/examples2d/character_controller2.rs +++ b/examples2d/character_controller2.rs @@ -88,6 +88,19 @@ pub fn init_world(testbed: &mut Testbed) { .rotation(impossible_slope_angle); colliders.insert(collider); + /* + * Create a wall we can’t climb. + */ + let wall_angle = PI / 2.; + let wall_size = 2.0; + let collider = ColliderBuilder::cuboid(wall_size, ground_height) + .translation(vector![ + ground_size + slope_size * 2.0 + impossible_slope_size + 0.35, + -ground_height + 2.5 * 2.3 + ]) + .rotation(wall_angle); + colliders.insert(collider); + /* * Create a moving platform. */ -- cgit