瀏覽代碼

-added custom metadata to physics shapes (2D only for now)
-gizmos are not displayed in camera preview

Juan Linietsky 11 年之前
父節點
當前提交
6fa63c9ded
共有 1 個文件被更改,包括 3 次插入0 次删除
  1. 3 0
      2d/kinematic_char/player.gd

+ 3 - 0
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()