drmcnellis / collisiondetectionkit

Automatically exported from code.google.com/p/collisiondetectionkit
0 stars 0 forks source link

Rotation isn't taken into account with the points returned from the collision.overlapping array #15

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. I used collision group, but I expect I'd have the same result with collision 
list too.
2. rotate 1 object on the stage, overlap with another.
3. Add a simple graphic to the stage using the x and y for each of the points 
in the collision group array. 

What is the expected output? What do you see instead?
You would expect the simple graphics getting drawn on top of the two objects 
where they're overlapping but the points are placed in the wrong positions on 
the stage.

What version of the product are you using? On what operating system?
CDK.v15

Please provide any additional information below.
..off topic. It would be good to have functions that return the centre point, 
height and width (relative to the stage) of the overlapping area which could be 
used rather than an array of points. This should make it faster and help when 
trying to separate the objects after a collision.

Original issue reported on code.google.com by stripedm...@gmail.com on 28 Jul 2010 at 4:33

GoogleCodeExporter commented 9 years ago
I've been looking into this some more.

Keeping 1 object at 0 rotation if the other is..
0 to 89, 91 to 179, 0 to -89, -91 to -179 it works correctly, 
but at a rotation of 90, -90, 180, -180 it goes horribly wrong!

Original comment by stripedm...@gmail.com on 28 Jul 2010 at 5:08

GoogleCodeExporter commented 9 years ago
after a further testing it seems to be in a range .18 either side of the 
troublesome numbers as long as 1 object has a 0 rotation, but as soon as you 
start rotating both objects it almost always makes a mess of it.

Original comment by stripedm...@gmail.com on 28 Jul 2010 at 5:29