28 lines
498 B
Markdown
28 lines
498 B
Markdown
# TransformComponent::SetPosition
|
|
|
|
**命名空间**: `XCEngine::Components`
|
|
|
|
**类型**: `method`
|
|
|
|
**头文件**: `XCEngine/Components/TransformComponent.h`
|
|
|
|
## 签名
|
|
|
|
```cpp
|
|
void SetPosition(const Math::Vector3& position);
|
|
```
|
|
|
|
## 作用
|
|
|
|
更新 `m_localPosition`。
|
|
|
|
## 当前实现
|
|
|
|
- 会更新 `m_localPosition`。
|
|
- 当前实现会调用 `GetWorldToLocalMatrix`、`MultiplyPoint`、`SetDirty`。
|
|
|
|
## 相关文档
|
|
|
|
- [TransformComponent](TransformComponent.md)
|
|
- [GetPosition](GetPosition.md)
|