bma73 Posted June 16, 2016 Share Posted June 16, 2016 Hi, I'm working on a tank game and want to clamp the turret's rotation to a specific angle. The turret is a child of the tank body and rotates with the body. It shall automatically rotate towards a target and should stop after an offset e.g. +/-45° from the body's forward vector is reached. http://babylonjs-playground.com/#TIXAM#6 Does anybody know how to achieve that? Thank you! Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted June 16, 2016 Share Posted June 16, 2016 Something like this? http://babylonjs-playground.com/#TIXAM#7 Quote Link to comment Share on other sites More sharing options...
adam Posted June 16, 2016 Share Posted June 16, 2016 another approach: http://babylonjs-playground.com/#TIXAM#8 Quote Link to comment Share on other sites More sharing options...
bma73 Posted June 17, 2016 Author Share Posted June 17, 2016 Great! Thank you for your help! 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.