I have a character with a platformer behavior on it. and i'd like the to bounce when they fall onto a semi circle bouncy ball sticking out of the ground. I'll apply a X and Y vector to it when it collides, but i'm not sure how to calculate the angle so that when they hit the top part of the circle they bounce more upwards, vs when they hit more of the side of the circle they would bounce at an angle backwards and more like real life.

I guess i need to figure out the "normal" angle at impact. but im not sure how to do that.

As it is a semi circle cant you just, on collision, use the angle from the centre (origin / image point) of the ball to an image point on your character sprite (maybe a bit nearer the bottom ) ?

yea so you need to multiply these vectors by the (hypotenuse) which id say a good start would be speed of your dude when he hits the ball (assuming a 100% transfer) or some factor of that speed (for more effect) then should be ok

you dont really need the (sqrt(Self.dx^2+Self.dy^2)) bit in this case you can just use the dy instead or 3, its there to just make it complete if your char was moving at an angle

same thing with absolutely no math thanks to construct 2

(note that this bounces at the angle of the player to the ball "normal to surface angle", which is probably good for games but not realistic, if you were going for more realism you might need add a bit or all of original movement vector angle to the normal angle and add some dampening, but as this is a big bouncy ball I think you can get away with normal to the surface ..)

Ive never used platform but had a quick look at its expressions and

dx and dy in the first example = exactly what would be x and y movement vectors

And (sqrt(Self.dx^2+Self.dy^2)) = exactly what would be player speed

So you can just substitute them over. i.e on collision with ball then player x vector = player speed * cos angle ball to player etc

I just gotta say, this worked really well. I'm doing sort of a drag and aim style of game play, but as it's for a vertical platformer, I was trying to see if there was a simple implementation using vectors and the platform behavior. works great so far!