I am trying to build a sequel to my game in Unity (http://www.rebubbled.com). If you feel like looking at the first level of the game you will understand what I am after.
In writing - I am trying to achieve the effect of ball (in a perfect bounce world) bouncing always same velocity on X after collision, and adjusting Y velocity depending on its Y position if needed so it always jumps to predetermined height (if it is jumping upwards after collision - if not, let it just use gravity and keep falling ‘naturally’).
2D is perfect, 3D works too.
After trying and failing many times over I figured I need some help.
Here is a snippet of calculating the new velocity.y (in case ball is moving upwards, after collision), if that helps…
Hello,
I played your pang clone and it looks cool.
Do you think you could share the code to make the spheres bounce and move?.
I tried the code above but my sphere stays jumping from one side to the other and doesn’t move anywhere else, just stays jumping in two spots.
Thanks.