소스 검색

-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()