-- 캐릭터 앞으로 이동하는 함수
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)
| 제목 | 작성자 | 작성일 | 조회 | |
|---|---|---|---|---|
| 공지 | 게시판 이용 안내+156 | 10-20 | 22559 | |
| 61852 | 02-10 | 33 | ||
| 61851 | 02-09 | 230 | ||
| 61850 | 02-09 | 279 | ||
| 61849 | 02-09 | 343 | ||
| 61848 | 02-08 | 521 | ||
| 61847 | 02-08 | 501 | ||
| 61846 | 02-08 | 391 | ||
| 61845 | 02-08 | 492 | ||
| 61844 | 02-08 | 496 | ||
| 61843 | 02-07 | 551 | ||
| 61842 | 02-06 | 1026 | ||
| 61841 | 02-03 | 1203 | ||
| 61840 | 02-02 | 1759 | ||
| 61839 | 02-01 | 1700 | ||
| 61838 | 02-01 | 1584 | ||
| 61837 | 02-01 | 1466 | ||
| 61836 | 01-29 | 1903 | ||
| 61835 | 01-29 | 1929 | ||
| 61834 | 01-28 | 2351 |
댓글1
그냥 오핫써;