martyj Posted January 15, 2017 Share Posted January 15, 2017 In my game I use SetInput for camera rotation and movement The problem is that the camera doesn't rotate if the player is standing still. The code: if(cameraMovement()) { double camMovementX = ((window->KeyDown(Key:) ? 1 : 0) - (window->KeyDown(Key::A) ? 1 : 0)) * strafeMultiplier; double camMovementZ = ((window->KeyDown(Key::W) ? 1 : 0) - (window->KeyDown(Key::S) ? 1 : 0)) * moveMultiplier * speedMultiplyer; this->playerModel->SetInput(cameraRotationY, camMovementZ, camMovementX); } else { this->playerModel->SetInput(cameraRotationY, 0.0, 0.0); // No movement if a menu is open } Link to comment Share on other sites More sharing options...
macklebee Posted January 15, 2017 Share Posted January 15, 2017 The player is the camera or the camera is parented to the player? What is the code for 'cameraRotationY'? What determines if 'cameraMovement()' (is this right? is it supposed to be a function? how is the function being evaluated?) is true? EDIT-- I thought I had read something similar about not being able to rotate the character when no strafe or movement: http://www.leadwerks.com/werkspace/topic/15442-setinput/ Are you in the Beta? Or has Josh not reverted this back yet? Win7 64bit / Intel i7-2600 CPU @ 3.9 GHz / 16 GB DDR3 / NVIDIA GeForce GTX 590 LE / 3DWS / BMX / Hexagon macklebee's channel Link to comment Share on other sites More sharing options...
martyj Posted January 15, 2017 Author Share Posted January 15, 2017 @Maclkebee Camera is a child of PlayerModel. PlayerModel is a Cylinder. cameraMovement() is a function in this case to check whether the player can move the camera. Returns True or False cameraRotationY is the rotation to be applied to the camera in the Y direction (left/right movement). Your link describes the exact same logic. I am NOT on beta. Link to comment Share on other sites More sharing options...
Thirsty Panther Posted January 16, 2017 Share Posted January 16, 2017 Same problem as gamecreator and I have. He posted a solution here. It was caused by Josh optimizing but is reverting it in the next release. Link to comment Share on other sites More sharing options...
Josh Posted January 25, 2017 Share Posted January 25, 2017 As pointed out, this is a duplicate. 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...
Recommended Posts