Curious if anyone else has tried to play with collision detection.
module.exports = function (bb8) {
console.log("Waiting for a collision");
bb8.detectCollisions();
bb8.color("green");
bb8.configureCollisions({
meth: 0x01,
xt: 0x20,
yt: 0x20,
xs: 0x20,
ys: 0x20,
dead: 0x50
});
bb8.on("collision", function(data) {
console.log("collision detected");
console.log(" data:", data);
bb8.color("red");
setTimeout(function() { bb8.color("green"); }, 1000);
});
bb8.roll(200, 0);
}
Hey all,
I've noticed the collision detection is hit or miss. I've followed this Issue to tweak the sensitivity, but it is unreliable. I can pick up BB-8 and a collision is detected. But BB-8 can run into a wall and lose its head and no collision detected. Seems that the collision has to be at a certain spot on the ball.
Curious if anyone else has tried to play with collision detection.
Here's my code: