3331
Window / Re: Insert and remove text not working with Events
« on: February 10, 2014, 07:29:52 pm »
Try this for your hex for backspace:
0x00000008
0x00000008
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
it still returns true and thinks that it's on the same tile as the player was on (400, 300).How do you know it thinks that? How are you testing to see if it's still true?
I'm using the same information you have given me regarding this collision.The information I gave you was to detect which tile the origin of the sprite was in (so you could work out whether it was supposed to collide or not). For the actual collision detection, you would need to test the boundary boxes for the sprite against the tiles' boundary boxes.
Why don't you simply write it like this?Or just do that :p Much simplerif (Collision(Ball[i].getPosition(), Ball[j].getPosition()))
Are you sure that I can just remove it? It would give me a different result...It wouldn't. You're subtracting zero. Removing that subtraction would change nothing. The (mass + mass) must stay, however, and leaving in the (mass - mass) won't harm anything so it's possibly safer to leave it there.
... the problem with the sticky ballsYou have the vector values the wrong way around for the collision. X comes before Y.
Points (or lines) expand half their width (0.5) in each direction, the coordinate that you give is the center. So if you want your point/line to fully cover a pixel, you must give its center position, which is xxx.5.That explains everything. Thanks