Removed unused code

This commit is contained in:
Antoine Pilote
2023-07-06 22:41:14 -04:00
parent b4734d2ccb
commit 5b8b9ea0c7
2 changed files with 0 additions and 39 deletions

View File

@@ -443,44 +443,6 @@ namespace Nuake
}
}
const Matrix4& DynamicWorld::GetCharacterControllerSimulatedTransform(const Entity& entity)
{
const uint32_t entityHandle = entity.GetHandle();
if (_registeredCharacters.find(entityHandle) != _registeredCharacters.end())
{
auto& characterController = _registeredCharacters[entityHandle];
JPH::Mat44 joltTransform = characterController->GetWorldTransform();
const auto bodyRotation = characterController->GetRotation();
Matrix4 transform = glm::mat4(
joltTransform(0, 0), joltTransform(1, 0), joltTransform(2, 0), joltTransform(3, 0),
joltTransform(0, 1), joltTransform(1, 1), joltTransform(2, 1), joltTransform(3, 1),
joltTransform(0, 2), joltTransform(1, 2), joltTransform(2, 2), joltTransform(3, 2),
joltTransform(0, 3), joltTransform(1, 3), joltTransform(2, 3), joltTransform(3, 3)
);
return transform;
//Vector3 scale = Vector3();
//Quat rotation = Quat();
//Vector3 pos = Vector3();
//Vector3 skew = Vector3();
//Vector4 pesp = Vector4();
//glm::decompose(transform, scale, rotation, pos, skew, pesp);
//auto& transformComponent = entity.GetComponent<TransformComponent>();
//transformComponent.SetLocalPosition(pos);
//transformComponent.SetLocalRotation(Quat(bodyRotation.GetW(), bodyRotation.GetX(), bodyRotation.GetY(), bodyRotation.GetZ()));
//transformComponent.SetLocalTransform(transform);
//transformComponent.Dirty = false;
}
assert("Shouldn't have reached here!");
return Matrix4(1.0);
}
JPH::Ref<JPH::Shape> DynamicWorld::GetJoltShape(const Ref<PhysicShape> shape)
{
JPH::ShapeSettings::ShapeResult result;

View File

@@ -61,7 +61,6 @@ namespace Nuake
// This is going to be ugly. TODO: Find a better way that passing itself as a parameter
void MoveAndSlideCharacterController(const Entity& entity, const Vector3 velocity);
const Matrix4& GetCharacterControllerSimulatedTransform(const Entity& entity);
RaycastResult Raycast(glm::vec3 from, glm::vec3 to);
void StepSimulation(Timestep ts);
void Clear();