Search the Community
Showing results for tags 'clamp'.
Hi. I would like to make the rotation of the gun at -45 and +45 (or less) degrees relative to that of the camera. When I limit the values, it only works according to the world coordinate. For example, when I turn a full turn to the left, I have to turn a full turn right again so that the gun rotates in the right direction. I want to do a gun control like Insurgency game. How can I fix this? Here is my code. float currentTime = Time::GetCurrent(); Vec2 currentMousePos = Window::GetCurrent()->GetMousePosition(); Window::GetCurrent()->SetMousePosition(Math::Round(Context::GetCurrent()