0
votes

I have two sprites, a ball and a wooden plank. If the ball falls off of the wooden plank the ball is supposed to simulate falling.

My problem is, how do I determine if the ball isn't touching the wooden plank? Should I just created edges around the plank and if the ball collides with them then it scales the ball?

There are multiple planks that are attached together.

Does anyone have an idea on how to accomplish this?

1

1 Answers

1
votes

Edges around the plank would work but a simpler way would be to use the collision callback's EndContact to determine when the ball and plank separate. However if the ball is allowed to bounce a bit while still over the plank and not be considered to have fallen off, you will need to check the position of the ball as well. If that is the case then placing some other sensors in the fall region might be more reliable.