It works with other behaviors, it should work with ball too.
But anyways, since it seems like i'm not going to be able to set the ball movements X/Y velocites, how does the ball behavior determine the angle of bounce?
Because I've got a custom movement set up and I really need ball/physics type bounces but those are dam hard for me to code.
Wouldn't it be cool to have some sort of generic 'bounce off object' type function, regardless of behaviour, where you put in the player object's X and Y velocites, and that of the obstacle (if it's even moving) and then construct does whatever it does to figure out the bounce direction for the ball and returns the new X and Y components for the player object which you would then have to store somewhere obviously.
I understand this is a pretty flighty, unrealistic and almost fictional suggestion, but it would be cool to be able to do realistic bounces (as in those that take into consideration the shape of the sprite) to custom
movements. I'm not sure how you would go about it since the X and Y velocites would be stored in variables so if that system ever worked you would have to find a way to return two separate values which you can then assign to whatever you want.
If you're thinking, 'But Arcticus, just use the ball behaviour, it bounces fine', yes it does bounce fine, but not when it's angle of motion is fixed because of using varibles for X and Y velocites instead of editing the ball's X/Y components directly. Setting the angle of motion and speed i can do fine, it's the bounces that it stuffs up.
Here's a little example of what i mean if you don't get me, it uses the platform movement only to show that proper bouncing whilst using the Set X component and Set Y component is completely possible, please ignore the odd direction of the platform bounce as it is not intended to be used this way:
Hopefully that conveys what I want