# FactorPhysics

월드 객체에 대해 물리 관련 설정을 처리하는 객체에요.

## **속성**

<br>

| **Velocity** |
| ------------ |

현재 물리 속도에요.

\-- 샘플 --

```lua
print(Workspace.Cube.Physics.Velocity)
```

<br>

| **bOverrideMass** |
| ----------------- |

부피로 질량을 자동 계산해요.

\-- 샘플 --

```lua
Workspace.Cube.Physics.bOverrideMass = true
```

<br>

| **Mass** |
| -------- |

질량 값이에요.

\-- 샘플 --

```lua
Workspace.Cube.Physics.MassInKg = 5000
```

<br>

| **LinearDamping** |
| ----------------- |

선형 감쇠 값이에요.

\-- 샘플 --

```lua
Workspace.Cube.Physics.LinearDamping = 0.1
```

<br>

| **AngularDamping** |
| ------------------ |

회전 감쇠 값이에요.

\-- 샘플 --

```lua
Workspace.Cube.Physics.AngularDamping = 0.1
```

<br>

| **Friction** |
| ------------ |

마찰력 값이에요.\
오브젝트의 표면 물리 마찰력을 설정할 수 있어요. 얼음판에서 공이 미끄러지는 정도를 설정할 수 있는 값이에요(0 \~ 1의 범위). 0에 가까울수록 잘 미끄러져요.

\-- 샘플 --

```lua
Workspace.Cube.Physics.Friction = 0.1
```

<br>

| **Restitution** |
| --------------- |

탄성 값이에요.\
오브젝트의 탄성 값을 설정할 수 있어요. 공이 탱탱볼 처럼 몇번 튕기다가 멈추도록 하는 설정값이에요(0 \~ 1의 범위). 1에 가까울수록 탄성이 더 커져요.

\-- 샘플 --

```lua
Workspace.Cube.Physics.Restitution = 0.1
```

<br>

| **Density** |
| ----------- |

밀도 값이에요.\
오브젝트의 밀도 값을 설정할 수 있어요(0 \~ 1의 범위). 1에 가까울수록 물체가 더 단단해지고 무거워져요.

\-- 샘플 --

```lua
Workspace.Cube.Physics.Density = 0.1
```

## **함수**

<br>

| **void AddForce(Vector Force)** |
| ------------------------------- |

객체에 물리 힘을 추가할 수 있어요. (힘을 가할 Vector 값)

\-- 샘플 --

```lua
local toy = Script.Parent
local force = Vector.new(50000, 0, 0)

target.Physics:AddForce(force) --force값 만큼 오브젝트를 밀어요. (오브젝트의 물리 프로퍼티가 켜져있어야 해요.)
```

<br>

| **void ZeroVelocity()** |
| ----------------------- |

객체의 물리 벡터를 0으로 초기화해요.

\-- 샘플 --

```lua
cube.Physics:ZeroVelocity()
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://ditoland-utplus.gitbook.io/ditoland/api-reference/common/factorphysics.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
