changed box size/scale
This commit is contained in:
@@ -101,7 +101,7 @@ public:
|
|||||||
auto ent = m_World->CreateEntity();
|
auto ent = m_World->CreateEntity();
|
||||||
std::shared_ptr<Components::Transform> transform = m_World->AddComponent<Components::Transform>(ent);
|
std::shared_ptr<Components::Transform> transform = m_World->AddComponent<Components::Transform>(ent);
|
||||||
transform->Position = glm::vec3(0.f, -3.f, -9.f);
|
transform->Position = glm::vec3(0.f, -3.f, -9.f);
|
||||||
transform->Scale = glm::vec3(2.f, 0.5f, 1.f);
|
transform->Scale = glm::vec3(8.f, 0.5f, 1.f);
|
||||||
transform->Orientation = glm::rotate(transform->Orientation, glm::radians(25.f), glm::vec3(0, 0, -1));
|
transform->Orientation = glm::rotate(transform->Orientation, glm::radians(25.f), glm::vec3(0, 0, -1));
|
||||||
|
|
||||||
std::shared_ptr<Components::Sprite> sprite = m_World->AddComponent<Components::Sprite>(ent);
|
std::shared_ptr<Components::Sprite> sprite = m_World->AddComponent<Components::Sprite>(ent);
|
||||||
|
|||||||
@@ -147,7 +147,7 @@ void dd::Systems::PhysicsSystem::CreateBody(EntityID entity)
|
|||||||
auto boxComponent = m_World->GetComponent<Components::RectangleShape>(entity);
|
auto boxComponent = m_World->GetComponent<Components::RectangleShape>(entity);
|
||||||
if (boxComponent) {
|
if (boxComponent) {
|
||||||
b2PolygonShape* bShape = new b2PolygonShape();
|
b2PolygonShape* bShape = new b2PolygonShape();
|
||||||
bShape->SetAsBox(absoluteTransform.Scale.x/4, absoluteTransform.Scale.y/4); //TODO: THIS SUCKS DUDE 4?!?!?!?
|
bShape->SetAsBox(absoluteTransform.Scale.x/2, absoluteTransform.Scale.y/2); //TODO: THIS SUCKS DUDE 4?!?!?!?
|
||||||
pShape = bShape;
|
pShape = bShape;
|
||||||
} else {
|
} else {
|
||||||
auto circleComponent = m_World->GetComponent<Components::CircleShape>(entity);
|
auto circleComponent = m_World->GetComponent<Components::CircleShape>(entity);
|
||||||
@@ -159,7 +159,7 @@ void dd::Systems::PhysicsSystem::CreateBody(EntityID entity)
|
|||||||
if (absoluteTransform.Scale.x != absoluteTransform.Scale.y && absoluteTransform.Scale.y != absoluteTransform.Scale.z) {
|
if (absoluteTransform.Scale.x != absoluteTransform.Scale.y && absoluteTransform.Scale.y != absoluteTransform.Scale.z) {
|
||||||
LOG_WARNING("Circles has to be of uniform scale.");
|
LOG_WARNING("Circles has to be of uniform scale.");
|
||||||
}
|
}
|
||||||
pShape->m_radius = absoluteTransform.Scale.x/4; //TODO: THIS ALSO SUCKS 4 WTH
|
pShape->m_radius = absoluteTransform.Scale.x/2; //TODO: THIS ALSO SUCKS 4 WTH
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user