:DitoLand
Studio ManualAPI ReferenceVideo TutorialSample
  • DitoLand Developer
  • ๐Ÿ“šGlossary
  • ๐ŸฅณEVENT
    • 2024 ๋ฉ”ํƒ€๋ฒ„์Šค ๊ฐœ๋ฐœ์ž ๊ฒฝ์ง„๋Œ€ํšŒ
    • ๐ŸŽŠ[์ข…๋ฃŒ] ๐Ÿ–ฅ ์ „๋‚จ๊ด€๊ด‘๋ฉ”ํƒ€๋ฒ„์Šค ์Šคํƒฌํ”„ ํˆฌ์–ด ์ธ์ฆ ์ด๋ฒคํŠธ
  • Notice
    • ์•ฝ๊ด€ ๊ฐœ์ •(2024.06.17)
    • ์•ฝ๊ด€ ๊ฐœ์ • (2024.03.04)
    • ์•ฝ๊ด€ ๊ฐœ์ • (2023.08.25)
    • ์•ฝ๊ด€ ๊ฐœ์ • (2022.12.14)
  • Manual
    • Studio
    • Resources
    • Studio Workflow Tips
    • NPC
    • NavMeshVolume
    • Land Teleport
    • Enterprise Account
    • Enterprise Studio Manual
    • Coroutine
    • AddTimeEvent
    • SaveUserData
    • Set Object Parameter
    • Toolbox Upload
    • Debugging (Breakpoint)
    • Gun Toy
    • Coupon / Event Key
    • Optimization
    • AI FSM
    • SpreadSheet
    • Mod Kit
    • AddReplicateValue / ConnectChangeEventFunction
    • Event Execution Order
    • WorldTree Search Filter
    • Object
    • Coordinate
    • Inworld Product
    • Management UserData & Leaderboard
    • Channel
    • World Event
    • Matchmaking
    • Collecting Game Logs
    • External Avatar
  • Coding Style
  • API Reference
    • Global
      • Variables
    • Lua
      • Built-in
      • NotSupport
    • Enums
      • AttachPoint
      • Bone
      • CharacterType
      • ChatCategoryType
      • ChatVisibleType
      • CollisionResponse
      • ControlMode
      • DivideTeamType
      • EventKeyState
      • InputMode
      • InventoryState
      • Key
      • KeyInputType
      • LuckyDrawOrderState
      • MaterialType
      • MediaStateType
      • ModeAnimStateType
      • ObjectSelectType
      • ObjectType
      • PathFollowingStatus
      • PointSpawnType
      • ProgressFillType
      • ProjectionType
      • QuickSlotState
      • ReplicateType
      • ScrollOrientationType
      • SimulatePhysicsType
      • SpawnType
      • TeamType
      • TeleportErrorType
      • TouchType
      • TransformPlayType
      • UIDisplayType
      • UIWidgetType
      • WidgetAnchorType
    • Common
      • BindEvent
      • Character
      • Collision
      • Color
      • CouponReturnData
      • DateTime
      • Environment
      • EventKeyReturnData
      • FactorPhysics
      • FiniteState
      • FiniteStateMachine
      • Game
      • GameStatisticsData
      • HitResult
      • Item
      • LandTransferData
      • Matrix
      • MouseHitResult
      • Object
      • Physics
      • ScriptPhase
      • TimeEvent
      • Track
      • Vector
      • WorldObject
    • Client
      • AnimStateBase
      • AnimStateMachine
      • AnimStateMachineSetting
      • BlendAnimationDataSetting
      • BlendAnimState
      • BlendAnimStateSetting
      • Button
      • Camera
      • CameraClient
      • Character
      • CharacterAnimationSetting
      • CharacterAppearanceSetting
      • CharacterBaseSetting
      • CharacterClient
      • CharacterSetting
      • Collider
      • Collision
      • DPad
      • Environment
      • FiniteStateMachine
      • Frame
      • FX
      • Game
      • GridBox
      • HyperLinkButton
      • Image
      • Input
      • InputGroup
      • InventoryBox
      • Item
      • ListView
      • LocalPlayer
      • Media
      • MediaView
      • NPC
      • ObjectGroup
      • ObjectNoneClient
      • PDFView
      • Physics
      • PointLight
      • ProgressBar
      • RemotePlayer
      • ScreenButton
      • ScreenUI
      • Script
      • ScrollBox
      • SequenceAnimState
      • SequenceAnimStateSetting
      • Sound
      • SpotLight
      • StaticMesh
      • SurfaceUI
      • Text
      • TextBox
      • UIScene
      • WebBrowser
      • WebForum
      • WidgetBase
      • YouTubeView
    • Server
      • Character
      • CharacterAnimationSetting
      • CharacterAppearanceSetting
      • CharacterBaseSetting
      • CharacterServer
      • CharacterSetting
      • Collider
      • Collision
      • Environment
      • FactorPhysics
      • FiniteStateMachine
      • FX
      • Game
      • Item
      • Media
      • NPC
      • Physics
      • Player
      • PointLight
      • Script
      • ScriptObjectGroup
      • ScriptObjectNoneServer
      • Sound
      • Spawner
      • SpawnPoint
      • SpawnPointGroup
      • SpotLight
      • StaticMesh
      • Team
      • UIScene
      • Widget
  • Tutorial
    • Script Tutorial
      • ์Šคํฌ๋ฆฝํŠธ ์‹ฌํ™” ๊ฐ•์ขŒ
        • 1. ์Šคํฌ๋ฆฝํŠธ์˜ ์ข…๋ฅ˜, ํ˜ธ์ถœ ์ˆœ์„œ, ํ˜ธ์ถœ, ํ†ต์‹ 
        • 2. ๋™๊ธฐํ™”, ํŒŒ๋ผ๋ฏธํ„ฐ, ์˜ˆ์™ธ์‚ฌํ•ญ
        • 3. ๋””ํ† ๋žœ๋“œ๋กœ ๋ฃจ์•„ ํ™œ์šฉํ•˜๊ธฐ
  • Sample
    • Scripting
    • Event
    • Collision & Physics
    • Transform
    • UI
    • Camera
    • Input
    • FX
    • Sound
  • Guide for Developers
    • Guide For Unity Developer
    • Guide For Roblox Developer
  • Release Note
    • Script Changes
      • 1.5.0 Map Changes
      • 1.2.0 Map Changes
      • 1.1.0 Map Changes
      • 1.0.0 Map Changes
      • 0.9.0 Map Changes
      • 0.7.0 Map Changes
      • 0.6.0 Map Changes
      • 0.5.0 Map Changes
      • 0.4.0 Map Changes
      • 0.3.0 Map Changes
      • 0.2.0 Map Changes
    • Known Issues
Powered by GitBook
On this page
  • ์†์„ฑ
  • ์ƒ์„ฑ์ž
  • ํ•จ์ˆ˜

Was this helpful?

  1. API Reference
  2. Common

Matrix

Matrix ๊ฐ์ฒด์˜ ์œ„์น˜ ํšŒ์ „ ๊ฐ’์„ ์–ป๊ฑฐ๋‚˜ ๋ณ€๊ฒฝ ํ•  ์ˆ˜ ์žˆ์–ด์š”.

์†์„ฑ

Location

Matrix์˜ ์œ„์น˜ ๊ฐ’

-- ์ƒ˜ํ”Œ --

local Cube = Workspace.Cube

local CubeTransform = Cube.Transform
print(CubeTransform.Location)

wait(2)
CubeTransform.Location = Vector.new(300, 0, 100)
Cube.Transform = CubeTransform

Rotation

Matrix์˜ ํšŒ์ „ ๊ฐ’

-- ์ƒ˜ํ”Œ --

local Cube = Workspace.Cube

local CubeTransform = Cube.Transform
print(CubeTransform.Rotation)

wait(2)
CubeTransform.Rotation = Vector.new(90, 45, 10)
Cube.Transform = CubeTransform

ScaleXYZ

Matrix์˜ ํฌ๊ธฐ ๊ฐ’

-- ์ƒ˜ํ”Œ --

local Cube = Workspace.Cube

local CubeTransform = Cube.Transform
print(CubeTransform.ScaleXYZ) --ํ•ด๋‹น ์˜ค๋ธŒ์ ํŠธ์˜ ํฌ๊ธฐ๋ฅผ 100์œผ๋กœ ๋‚˜๋ˆ ์„œ Vector๋กœ ๋ฐ˜ํ™˜ํ•ด์š”.(์˜ˆ๋ฅผ ๋“ค์–ด x๊ฐ’์ด 100์ด๋ฉด 1๋กœ ๋ฐ˜ํ•œ๋ผ์š”.)

wait(2)
CubeTransform.ScaleXYZ = Vector.new(5, 5, 5)
Cube.Transform = CubeTransform

์ƒ์„ฑ์ž

Matrix new()

Matrix ๋ฅผ ์ƒ์„ฑํ•ด์š”.

ํ•จ์ˆ˜

void AddLocation(number x, number y, number z)

์ฃผ์–ด์ง„ ๊ฐ’์œผ๋กœ ๊ธฐ์กด ์œ„์น˜์— +๋กœ ๊ณ„์‚ฐํ•ด์„œ ์œ„์น˜๋ฅผ ์„ค์ •ํ•ด์š”. (๋”ํ•˜๊ธฐ ํ•  X ๊ฐ’, ๋”ํ•˜๊ธฐ ํ•  Y ๊ฐ’, ๋”ํ•˜๊ธฐ ํ•  Z ๊ฐ’)

-- ์ƒ˜ํ”Œ --

local cube = Workspace.Cube
local cubeTransform = cube.Transform

print(cubeTransform.Location)

cubeTransform:AddLocation(200, 0, 0)
print(cubeTransform.Location)
cube.Transform = cubeTransform

void AddLocation(Vector Location)

์ฃผ์–ด์ง„ Vector๋กœ ๊ธฐ์กด ์œ„์น˜์— +๋กœ ๊ณ„์‚ฐํ•ด์„œ ์œ„์น˜๋ฅผ ์„ค์ •ํ•ด์š”. (๋”ํ•˜๊ธฐ ํ•  Vector ๊ฐ’)

-- ์ƒ˜ํ”Œ --

local cube = Workspace.Cube
local cubeTransform = cube.Transform

cubeTransform:AddLocation(Vector.new(0, 100, 0))
cube.Transform = cubeTransform

void AddRotation(Vector rotation)

์ฃผ์–ด์ง„ ๊ฐ’์œผ๋กœ ๊ธฐ์กด ๊ฐ๋„์— +๋กœ ๊ณ„์‚ฐํ•ด์„œ ๊ฐ๋„๋ฅผ ์„ค์ •ํ•ด์š”. (๋”ํ•˜๊ธฐ Vector ๊ฐ’)

-- ์ƒ˜ํ”Œ --

local cube = Workspace.Cube
local cubeTransform = cube.Transform

cubeTransform:AddRotation(Vector.new(0, 100, 0))
cube.Transform = cubeTransform

void AddRotation(number x, number y, number z)

์ฃผ์–ด์ง„ ๊ฐ’์œผ๋กœ ๊ธฐ์กด ๊ฐ๋„์— +๋กœ ๊ณ„์‚ฐํ•ด์„œ ๊ฐ๋„๋ฅผ ์„ค์ •ํ•ด์š”. (๋”ํ•˜๊ธฐ ํ•  X ๊ฐ’, ๋”ํ•˜๊ธฐ ํ•  Y ๊ฐ’, ๋”ํ•˜๊ธฐ ํ•  Z ๊ฐ’)

-- ์ƒ˜ํ”Œ --

local cube = Workspace.Cube
local cubeTransform = cube.Transform

print(cubeTransform.Rotation)

cubeTransform:AddRotation(50, 0, 0)
print(cubeTransform.Rotation)
cube.Transform = cubeTransform

Vector GetForward()

๊ฐ์ฒด๊ฐ€ ๋ฐ”๋ผ๋ณด๊ณ  ์žˆ๋Š” ๋ฐฉํ–ฅ Vector์„ ์–ป์„ ์ˆ˜ ์žˆ์–ด์š”.

-- ์ƒ˜ํ”Œ --

local cubeTransform = Workspace.Cube.Transform
print(cubeTransform:GetForward())

Vector GetRight()

๊ฐ์ฒด๊ฐ€ ๋ฐ”๋ผ๋ณด๊ณ  ์žˆ๋Š” ๋ฐฉํ–ฅ์˜ ์˜ค๋ฅธ์ชฝ ๋ฐฉํ–ฅ Vector๋ฅผ ์–ป์„ ์ˆ˜ ์žˆ์–ด์š”.

-- ์ƒ˜ํ”Œ --

local cubeTransform = Workspace.Cube.Transform
print(cubeTransform:GetRight())

Vector GetTop()

๊ฐ์ฒด์˜ ์œ„์ธก ๋ฐฉํ–ฅ Vector๋ฅผ ์–ป์„ ์ˆ˜ ์žˆ์–ด์š”.

-- ์ƒ˜ํ”Œ --

local cubeTransform = Workspace.Cube.Transform
print(cubeTransform:GetTop())

void LookAt(Vector TargetPostion, Vector UpVector)

ํŠน์ • ์œ„์น˜๋ฅผ ๋ฐ”๋ผ๋ณด๊ฒŒ ๋ณ€๊ฒฝํ•ด์š”.

-- ์ƒ˜ํ”Œ --

local transform = character.Transform
transform:LookAt(Workspace.Cube1.Location, Vector.new(0, 0, 150))
character.Transform = transform
PreviousLandTransferDataNextMouseHitResult

Last updated 1 year ago

Was this helpful?