-- 캐릭터 앞으로 이동하는 함수
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)
| 제목 | 작성자 | 작성일 | 조회 | |
|---|---|---|---|---|
| 33097 | 02-08 | 332 | ||
| 33096 | 02-08 | 648 | ||
| 33095 | 02-08 | 413 | ||
| 33094 | 02-08 | 821 | ||
| 33093 | 02-08 | 510 | ||
| 33092 | 02-08 | 290 | ||
| 33091 | 02-08 | 604 | ||
| 33090 | 02-08 | 439 | ||
| 33089 | 02-08 | 331 | ||
| 33088 | 02-08 | 347 | ||
| 33087 | 02-08 | 335 | ||
| 33086 | 02-08 | 352 | ||
| 33085 | 02-08 | 430 | ||
| 33084 | 02-08 | 368 | ||
| 33083 | 02-08 | 456 | ||
| 33082 | 02-08 | 715 | ||
| 33081 | 02-08 | 465 | ||
| 33080 | 02-08 | 638 | ||
| 33079 | 02-08 | 368 | ||
| 33078 | 02-08 | 929 |
댓글1
그냥 오핫써;