i need help with balls bouncing correctly off of walls

diegocsdiegocs Member Posts: 531
edited November -1 in Working with GS (Mac)
i have this circle ("ball") that moves throughout the screen bouncing against the walls, but i can't managed to make it bounce correctlly ("naturally") off the walls (hence i don't use restitution since i don't want a speed change). i tried change velocity to (same velocity) and direction 180-vectortoangle(linear.velocity.x,linear.velocity.y) but that only worked for horizontal walls, and the same thing but with 180 + vectortoangle("", "") it worked only for vertical. Is there a way to mange it to work for both?

Comments

Sign In or Register to comment.