gamecreator Posted March 28, 2017 Share Posted March 28, 2017 I know it seems like we just had this topic but that was camera related. Pretty sure this one's controller related. The ground is an exported collisionmesh (polygonal mesh collision shape). Any idea why the controller jitters in my program? #include "App.h" using namespace Leadwerks; App::App() : window(NULL), context(NULL), world(NULL), camera(NULL) {} App::~App() { delete world; delete window; } Model* model = NULL; Entity* player = NULL; bool App::Start() { window = Leadwerks::Window::Create("Controller Test", 0, 0, 1280, 720, Leadwerks::Window::FullScreen); context = Context::Create(window); world = World::Create(); //Load a map Map::Load("Maps/map2.map"); camera = Camera::Create(); camera->SetRotation(45, 0, 0); camera->Move(0, 1, -15); camera->SetDebugPhysicsMode(true); Light* light = DirectionalLight::Create(); light->SetRotation(35, 35, 0); model = Model::Load("Models/Barbarian/barbarian.mdl"); model->SetRotation(0, 180, 0); player = Pivot::Create(); model->SetParent(player, false); model->SetPosition(0, 0, 0); player->SetMass(1); player->SetPhysicsMode(Entity::CharacterPhysics); player->SetPosition(0, 10, 0); return true; } bool App::Loop() { if(window->Closed() || window->KeyDown(Key::Escape)) return false; float move = (window->KeyDown(Key::Up) - window->KeyDown(Key::Down)) * 3; float strafe = (window->KeyDown(Key::Right) - window->KeyDown(Key::Left)) * 3; player->SetInput(0, move, strafe); camera->SetPosition(player->GetPosition(true), true); camera->Move(0, 0, -5); Time::Update(); world->Update(); world->Render(); context->Sync(); return true; } Quote Link to comment Share on other sites More sharing options...
Josh Posted March 28, 2017 Share Posted March 28, 2017 This reportedly has been fixed in recent versions of Newton but I can't update it right now without breaking everything, s it is a more involved task. 1 Quote My job is to make tools you love, with the features you want, and performance you can't live without. Link to comment Share on other sites More sharing options...
Rick Posted March 28, 2017 Share Posted March 28, 2017 I would assume it's the same issue I have. The controller seems like it's always falling a little then it lifts back up a little creating the jitters we see. @Gamecreator my issue was controller related as well. The controller jittering was/is the main issue. I feel like the controller should be smooth as it's moving. 1 Quote Link to comment Share on other sites More sharing options...
gamecreator Posted March 28, 2017 Author Share Posted March 28, 2017 Thanks guys. Hopefully this is considered a high priority issue and will be fixed soon (I'm on the release version). Quote Link to comment Share on other sites More sharing options...
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.