Trenchbroom parser work with entities
Fixed lighting Fixed global position system Fixed child deletion system. editor work for custom entities registration
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
|
||||
TransformComponent::TransformComponent()
|
||||
{
|
||||
GlobalTranslation = Vector3(0, 0, 0);
|
||||
Translation = Vector3(0, 0, 0);
|
||||
Rotation = Vector3(0, 0, 0);
|
||||
Scale = Vector3(1, 1, 1);
|
||||
@@ -11,7 +12,7 @@ TransformComponent::TransformComponent()
|
||||
glm::mat4 TransformComponent::GetTransform()
|
||||
{
|
||||
Matrix4 transform = Matrix4(1.0f);
|
||||
transform = glm::translate(transform, Translation);
|
||||
transform = glm::translate(transform, GlobalTranslation);
|
||||
transform = glm::rotate(transform, glm::radians(Rotation.x), Vector3(1, 0, 0));
|
||||
transform = glm::rotate(transform, glm::radians(Rotation.y), Vector3(0, 1, 0));
|
||||
transform = glm::rotate(transform, glm::radians(Rotation.z), Vector3(0, 0, 1));
|
||||
|
||||
Reference in New Issue
Block a user