Golden Gui Posted February 11, 2019 Share Posted February 11, 2019 Hello everyone, i'm facing an issue pretty weird discovering the melonJS framework following the space invaders tutorial. When i try to implement the player movement actions, i get a problem on the clamp function of the Sprite Object. I'm more from the TypeScript world so not really used to the old way making objects on js, but i verified the melonjs.js file, and the function seems to be implemented well into the object. I use the last release of the boilerplate by the way. Thanks in advance. Quote Link to comment Share on other sites More sharing options...
obiot Posted February 12, 2019 Share Posted February 12, 2019 Hi, since the 6.0.0 version we sandboxed all previous extensions under our me namespace : https://github.com/melonjs/melonJS/wiki/Upgrade-Guide#5xx-to-600 As a consequence the clamp method is since then only available through me.Math.clamp() http://melonjs.github.io/melonJS/docs/me.Math.html#clamp rather do : pos.x = me.Math.clamp(val, min, man) should fix your issue. 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.