Game Development Community

Weird stickiness and bounciness

by John Lopez · in Torque Game Builder · 05/12/2007 (2:53 pm) · 2 replies

I'm sure everyone's come across this at some point. I've tried messing with the collision and physics settings, and I'm getting nowhere.

I'm new to TGB, so I'm trying to make a bunch of simple games. I made a breakout clone already, so I figured I'd move on to something esle, so I'm trying out making a match-three. I don't really like match-threes, but I figured, I'm not going to try to innovate too much when I'm just trying to learn the basics. It should be easy to whip one up.

At least it would be if it were'nt for these two collision/physics problems.

Problem 1: The damn things won't fall!

farm1.static.flickr.com/226/494834560_533795a56f.jpg?v=0
I've set up the scene with three rows of fruit (static sprites) over an invisible tilemap in the background that has a wall at the bottom row to keep the fruit from falling through the bottom of the screen. All the fruit is set to drop with a constant force of 5, but as you can see, only the bottom row makes it to the bottom. The sprites all have a size of 4 units, and I've arranged them using the level editor with a grid of 4 units, snapping to the grid.


Problem 2: Unwanted bounciness

I've taken a video screenshot of the problem:

video.google.com/videoplay?docid=-5335421979516624393

I've toyed with the collision and physics options in the Collision tab to no avail. I also tried changing the collision mode from CLAMP to STICKY, and it doesn't do much. It ended up fixing the watermelons on the left, but making the strawberries on the right start bouncing.


Why is this happening to me?!

#1
06/01/2007 (12:30 pm)
It sounds like the problem has to do with stacking the objects.

Have you tried setting them to immovable and turning off the constant force when the fruit hit the bottom? Check out this tutorial, particularly the last function:
tdn.garagegames.com/wiki/TGB/MiniTutorials/SimplePhysicsDemo
#2
06/02/2007 (6:40 am)
Wow, somehow I missed that tutorial. I'm going to take a look at it. I figured that I would have to do something like changing the constant force, but everything would be so much easier if it would just not bounce! I'm going to try out these suggestions. Thanks.