1 decade ago by Heiko
Hi
I get the error (in box2d lib.js):
Uncaught TypeError: Cannot call method 'IsLower' of undefined
Anybody had this before or any idea why ?
I get this after my box2d object drops out of the box2d world.
Basically when my box2d object collides with groundbox, or drops out of world, I detect that velocity of object == 0, then I destroy my box2d entities and create new ones at original starting position for level. (i.e. reset the level).
If my box2d objects hits ground box, and I restart level, then it works fine. But if it drops out of bounds (doesn't hit ground but falls out of right side of screen), then I get the error mentioned, while I re-create new box2d objects.
Any advice ?
Quickfix would be to add collision boxes on all 4 sides, not just the ground so that my object can't fall out of the word.
Alternative is that I reformat lib.js so that its more readable - currently can't debug where error occurs, since its 'minimized' and unreadable.
I get the error (in box2d lib.js):
Uncaught TypeError: Cannot call method 'IsLower' of undefined
Anybody had this before or any idea why ?
I get this after my box2d object drops out of the box2d world.
Basically when my box2d object collides with groundbox, or drops out of world, I detect that velocity of object == 0, then I destroy my box2d entities and create new ones at original starting position for level. (i.e. reset the level).
If my box2d objects hits ground box, and I restart level, then it works fine. But if it drops out of bounds (doesn't hit ground but falls out of right side of screen), then I get the error mentioned, while I re-create new box2d objects.
Any advice ?
Quickfix would be to add collision boxes on all 4 sides, not just the ground so that my object can't fall out of the word.
Alternative is that I reformat lib.js so that its more readable - currently can't debug where error occurs, since its 'minimized' and unreadable.