Game Development Community

Perfect Rebound on a movable object

by Dan Hargrove · in Torque Game Builder · 09/16/2005 (9:00 am) · 1 replies

Okay, I've recently purchased the T2D engine and am now trying to delve into it by starting with a Breakout type game. I have to admit, I'm trying to get used to the physics involved here. I can get rebounding off the walls and bricks (though I'm still tweaking the bricks), but the paddle is giving me fits.

According this thread: http://www.garagegames.com/mg/forums/result.thread.php?qt=27340, Melv mentions that to obtain perfect rebound, the following has to be set:

Source Restution = 1
Source Friction = 0
Destination Density = 0 (Immovable)


Now, it's obvious that you can't have an immovable paddle, but I've done so anyways and all is right when it does hit it. But, when I set it back to movable, the ball loses velocity when it hits.

How can I make the paddle moveable and still get the desired result of the perfect rebound? Does this mean that I'm going to have to code my own physics?

Thanks,
Dan

#1
09/16/2005 (12:11 pm)
For my game, I coded my own collision response for the paddle. For the balls, I manually check the speed of the ball to make sure it doesn't slow below a certain speed. As I understand it, the next release of the engine should enable us to have collisions of this type without hacks.