Object needs to collide with background wall when thrown
huppertator
Member Posts: 34
I have an object, let's say a bottle, that's being thrown at a moving target. There is a wall behind the target that I want the bottle to hit and break on if it misses the target, instead of continuing off the screen. However, I can't figure out how to make this happen. I've tried using invisible blocks where once the bottle overlaps with the blocks it breaks, but then it only breaks on the bottom block (they are layered up the screen over the wall object). I've tried tracking the y velocity and creating a range that the bottle would break at but then it would break right when it was thrown.
Any suggestions? The device orientation is portrait, if that matters, and the bottle is just being thrown at the target by a flick motion.
Any suggestions? The device orientation is portrait, if that matters, and the bottle is just being thrown at the target by a flick motion.
Comments
I'm going to try this.
The only problem is when to gauge a shatter on the wall. I'm using a form of @tshirtbooth 's ball throwing template for throwing the bottle, I'm just not sure how to track the bottle to determine when it is "hitting" the wall.