Bounce inside a circle


#1

Hi,
I’m rewriting one of my game to use Physics 2.0.
In the game, players and ball are inside a circular field.
I can bounce players back towards the center when they try to get out, but how can I handle the ball bounces?

In my first version, I used Ball.ForceAngle() to know which way it was coming from, and then, with some maths wizardry, I would get the bounce angle.
With Physics 2.0, ForceAngle remains at 0, it seems.
I tried to do an outer obstacle but the collision masks don’t allow a “cutout” circle.
Here’s the field:


Cheers!


#2

@Gruk Did you got to solve this?


#3

Well, not really, I think we need more customization on the collision masks.
I placed an invisible Center object and checked the distance of objects from that Center point to trigger the bounces.
But yesterday, I made changes to the game, and I placed small walls all around the circle. It took me 36 walls (10 degrees each)… about 10 minutes, I guess.