redcat34 / rokon

Automatically exported from code.google.com/p/rokon
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

MathHelper intersect problem #170

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. create two sprites
2. intersect them in lower right corner
3. use sprite.intersect(sprite2)

What is the expected output?
true, they are intersecting

What do you see instead?
false 

What version of Rokon are you using?
2.0.3

On which version of Android are you experiencing this?
2.2

Please provide any additional information below.
In MathHelper you guys gut a simple copy-paste error

if(sprite1.polygon == Rokon.rectangle && 
sprite2.polygon == Rokon.rectangle && 
sprite1.rotation == 0 && 
sprite2.rotation == 0) {

return rectOverlap(sprite1.getX(), 
sprite1.getY(), 
sprite1.getX() + sprite1.getWidth(), 
sprite1.getX() + sprite1.getHeight(), << this is the type, it should be getY() 
instead of getX()
sprite2.getX(), 
sprite2.getY(), 
sprite2.getX() + sprite2.getWidth(), 
sprite2.getY() + sprite2.getHeight());
}

Original issue reported on code.google.com by monsterguden@gmail.com on 27 Oct 2010 at 8:23

GoogleCodeExporter commented 8 years ago
I saw that its already fixed in r366. 
(dont know how to remove the Issue)

Original comment by monsterguden@gmail.com on 27 Oct 2010 at 8:44

GoogleCodeExporter commented 8 years ago
Issue 105 is the same problem, sorry for not search correctly but i thought 
that the issue was open so didn't look for a closed one.

Original comment by monsterguden@gmail.com on 27 Oct 2010 at 8:47