soulVampire Posted September 26, 2020 Share Posted September 26, 2020 how do you use the melonjs response.b.body.collisionType.bInA to check if player is in ladder tried but not working, doing something wrong with the assignment of the object Quote Link to comment Share on other sites More sharing options...
obiot Posted October 5, 2020 Share Posted October 5, 2020 Sorry for the late answer, normally you should have all you need here : http://melonjs.github.io/melonJS/docs/me.collision.html#.ResponseObject - you can check if b is an instance of a ladder object - use the overlapV vector to determine by "how much" your player collides with the ladder, I would rather use that instead of binA, as there is little chance the player is always completely inside the ladder (see in your picture it is overlapping, but not completely inside, check the collision box, in red, using the Debug panel) as for types, this is more to limit which object the main player (or others can collide with), but by default this is mostly all of them, so it should not be an issue http://melonjs.github.io/melonJS/docs/me.collision.html#.types let me know if this helps, or if you managed to implement it in the meanwhile 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.