aiaf Posted November 15, 2015 Share Posted November 15, 2015 Hello Wanted to replace the mouse cursor with something else, so i draw a * character. When i look around with the camera the * character it wobbles around, leaving some drawing marks. I need the crosshair to stay put at the center of screen and move smoothly, any ideea how to solve this ? if(!console->isMainMenuMode()) { context->SetBlendMode(Blend::Alpha); context->DrawText("*", player->currentMousePosition.x, player->currentMousePosition.y); context->SetBlendMode(Blend::Solid); } Camera is setup as below: camera->Move(camMovement); currentMousePosition = window->GetMousePosition(); mouseDifference.x = currentMousePosition.x - centerMouse.x; mouseDifference.y = currentMousePosition.y - centerMouse.y; camRotation.x += mouseDifference.y / mouseSensitivity; camRotation.y += mouseDifference.x / mouseSensitivity; camera->SetRotation(camRotation); window->SetMousePosition(centerMouse.x, centerMouse.y) Quote I made this with Leadwerks/UAK: Structura | Stacky Desktop Edition Website: Binary Station Link to comment Share on other sites More sharing options...
f13rce Posted November 16, 2015 Share Posted November 16, 2015 Instead of drawing on the mouse you can try to draw it on the center of the window width and height. This way it will be drawn from the center. Simply use window->GetWidth() / 2 and window->GetHeight() / 2 Quote Using Leadwerks Professional Edition (Beta), mainly using C++. Windows 10 / Linux Mint, Visual Studio 2017. GPU: NVidia GeForce GTX970, CPU: Intel i7 7700K @ 4.20 GHz Previously known as Evayr. Link to comment Share on other sites More sharing options...
Thirsty Panther Posted November 16, 2015 Share Posted November 16, 2015 Macklebee helped me with this very same problem. Solution here. http://www.leadwerks.com/werkspace/topic/13390-how-to-change-the-mouse-icon/page__hl__mouse 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.