From bf6fc1182ccde421c179955d3c10cb1442032d90 Mon Sep 17 00:00:00 2001 From: Daid Date: Sun, 16 Oct 2022 08:59:22 +0200 Subject: [PATCH] =?UTF-8?q?Fix=20=C2=96https://github.com/daid/EmptyEpsilo?= =?UTF-8?q?n/issues/1767?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/collisionable.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/collisionable.cpp b/src/collisionable.cpp index 1887405e..1b87f868 100644 --- a/src/collisionable.cpp +++ b/src/collisionable.cpp @@ -291,6 +291,8 @@ void Collisionable::createBody(b2Shape* shape) bodyDef.type = static_physics ? b2_kinematicBody : b2_dynamicBody; bodyDef.userData = this; bodyDef.allowSleep = false; + bodyDef.position = v2b(this->position); + bodyDef.angle = glm::radians(this->rotation); body = CollisionManager::world->CreateBody(&bodyDef); }