Page 1 of 1

trigger when out of bounds.

PostPosted: Sat Jun 02, 2007 5:28 am
by shinobeofsand
Since I'm making a simple version of pong I change the xvelocity and the yvelocity of the ball to have it move around. How can I set it up so that when the ball's edge (not the center) hits one of the edges of view it will reverse velocity?

PostPosted: Sat Jun 02, 2007 1:20 pm
by Jay S.
You could set up Filled Regions where you want the ball not to go, then use a Collision > Physical Response event for the ball that when the ball collides with the Filled Regions, it would bounce off. (You could use the "Final velocity multiplier" to change how the ball collides with the walls. Just experiment with the settings until they are satisfactory.)

I'm not exactly sure what you want, so I'm hoping this has helped you. :(

PostPosted: Sat Jun 02, 2007 3:11 pm
by d-soldier
You can not have it collide with the edges of view... Like Jay suggested, set up some filled regions around view. If you are using a sprite with any kind of transparency for the ball, GE will run all collisions based on contact with it's edges (sides).