채팅0

    이거 좀 도와주실분?

    조회수 435

    -- 캐릭터 앞으로 이동하는 함수

    function MoveForward(distance)

    local player = GetMyCharacter() -- 현재 캐릭터 가져오기

    local currentPosition = player.GetPos() -- 현재 위치 가져오기

    -- 앞으로 이동할 위치 계산
    local forwardVector = player.GetForwardVector()
    local targetPosition = currentPosition + (forwardVector * distance)
    
    -- 이동 커맨드 생성
    local moveCommand = {
        type = "move",
        position = targetPosition
    }
    
    -- 이동 커맨드 실행
    player.ExecuteCommand(moveCommand)

    end


    -- 캐릭터 앞으로 1미터 이동

    MoveForward(1)

    댓글1

    회원프로필

    그냥 오핫써;

    2024.02.08 22:35

      게시글 리스트
      제목작성자작성일조회
      3311302-08603
      3311202-08501
      3311102-08605
      3311002-08743
      3310902-08403
      3310802-08572
      3310702-08463
      3310602-08454
      3310502-08450
      3310402-08450
      3310302-08661
      3310202-08563
      3310102-08452
      3310002-08632
      3309902-081185
      3309802-08385
      3309702-08358
      3309602-08708
      3309502-08436
      3309402-08848
      안내 배너 이미지