2
Godot 게임 엔진을 배우고 있으며 걸을 수 있고 다른 오브젝트를 통과 할 수없는 공을 만들려고했지만 공이 다른 오브젝트를 계속 통과합니다.Kinematic 오브젝트가 충돌을 감지하지 못합니다 - Godot
extends KinematicBody2D
export var viteza = 140
func _ready():
set_fixed_process(true)
func _fixed_process(delta):
delta *= 5
var motion = Vector2()
if Input.is_key_pressed(KEY_UP):
motion[0] = 0
motion[1] = -1
if Input.is_key_pressed(KEY_DOWN):
motion[0] = 0
motion[1] = 1
if Input.is_key_pressed(KEY_LEFT):
motion[0] = -1
motion[1] = 0
if Input.is_key_pressed(KEY_RIGHT):
motion[0] = 1
motion[1] = 0
motion = motion * viteza * delta
set_pos(get_pos() + motion)
장면 (이미지) : Scene
어떤 문제가 여기에
코드인가?