SpiderPig Posted April 18, 2019 Posted April 18, 2019 I swear I must be doing something wrong, I can't get the following code to do anything. The body remains active (orange) yet doesn't move. This is using the latest 4.6 update on the default branch. #include "App.h" using namespace Leadwerks; App::App() : window(NULL), context(NULL), world(NULL), camera(NULL) {} App::~App() { delete world; delete window; } bool wireframe = false; bool App::Start() { window = Window::Create(); context = Context::Create(window); world = World::Create(); camera = Camera::Create(); camera->SetFOV(70.0f); camera->Move(0, 0, -15); auto player = Model::Cylinder(); auto s = Shape::Cylinder(); player->SetShape(s); player->SetMass(1.0f); return true; } bool App::Loop() { if (window->KeyHit(Key::Escape) == true) { return false; } if (window->KeyHit(Key::F3) == true) { camera->SetDebugPhysicsMode(!camera->GetDebugPhysicsMode()); } if (window->KeyHit(Key::F2) == true) { if (wireframe == true) { camera->SetDrawMode(0); wireframe = false; } else { camera->SetDrawMode(2); wireframe = true; } } world->Update(); world->Render(); context->Sync(); return true; } Quote
Solution SpiderPig Posted April 18, 2019 Author Solution Posted April 18, 2019 Time::Update(); ah well - you have to add this. ? 1 Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.