How to collide with a bouncing object?
huppertator
Member Posts: 34
I have a separate question out about another part of this game, but this issue is also very troublesome.
I have a bouncing actor, a hand on a spring, that I want to collide with a bottle being thrown at a target. I only want the bottle to get smashed by the hand when the hand is sprung up (because of the placement on the scene the bottle is able to hit the hand anywhere, anytime). Because of the way I'm animating the hand (14 frames, 7 frames per sec, hand is up in frames 4-10) it's really hard to match the time the hand is up with a boolean or timer.
Right now I'm using a timer: after .6 seconds... and a nested timer: for 1 second CHANGE ATTRIBUTE boolean hand up to TRUE. But that obviously isn't doing the job right because it isn't keeping track of when hand up is false. Not sure what to do here.
I have a bouncing actor, a hand on a spring, that I want to collide with a bottle being thrown at a target. I only want the bottle to get smashed by the hand when the hand is sprung up (because of the placement on the scene the bottle is able to hit the hand anywhere, anytime). Because of the way I'm animating the hand (14 frames, 7 frames per sec, hand is up in frames 4-10) it's really hard to match the time the hand is up with a boolean or timer.
Right now I'm using a timer: after .6 seconds... and a nested timer: for 1 second CHANGE ATTRIBUTE boolean hand up to TRUE. But that obviously isn't doing the job right because it isn't keeping track of when hand up is false. Not sure what to do here.
Comments
What about an invisible actor that is placed above the bouncing hand and when the bouncing hand collides with the invisible actor it activates a new "collision with bottle is possible" on/off rule ?
Maybe I could do if the bottle is beyond a certain y position and the hand is also past the y position then the collision will occur?