From 371eac9beffdfe416b8555ee006baf0ffae2bef3 Mon Sep 17 00:00:00 2001 From: Juan Linietsky Date: Thu, 16 Oct 2014 00:06:34 -0300 Subject: -added custom metadata to physics shapes (2D only for now) -gizmos are not displayed in camera preview --- demos/2d/kinematic_char/player.gd | 3 +++ 1 file changed, 3 insertions(+) (limited to 'demos/2d/kinematic_char') diff --git a/demos/2d/kinematic_char/player.gd b/demos/2d/kinematic_char/player.gd index 5c56477758..9cff0269e8 100644 --- a/demos/2d/kinematic_char/player.gd +++ b/demos/2d/kinematic_char/player.gd @@ -74,6 +74,9 @@ func _fixed_process(delta): var floor_velocity=Vector2() if (is_colliding()): + # you can check which tile was collision against with this + # print(get_collider_metadata()) + #ran against something, is it the floor? get normal var n = get_collision_normal() -- cgit v1.2.3