Character controller now responds to setting localPosition on the entity

This commit is contained in:
Antoine Pilote
2024-04-01 19:22:20 -04:00
parent aad15899fd
commit f86e26a490
7 changed files with 47 additions and 37 deletions

View File

@@ -112,6 +112,11 @@ namespace Nuake {
{
auto& component = entity.GetComponent<TransformComponent>();
component.SetLocalPosition({ x, y, z });
if (entity.HasComponent<CharacterControllerComponent>())
{
PhysicsManager::Get().SetCharacterControllerPosition(entity, { x, y, z });
}
}
}