If the walls are destructible, then they must be active objects, right? That means that they would have alterable values that can be referenced, right? If you can't make alt values work, would you be able to use the object's direction?
Find the distance between the top Y, bottom Y, left X, right X of the sprite
E.g tan A = Y/X
Tan A = (Y top - Y Bottom)/(X left - X right)
therefore A = arctan (Tan A)
however i think MMF does this result in radians.
pi radians = 180 degrees
So A in degrees = A * 180/pi
This should theoretically work, if you can do it using this method.
My signature is never too big!!!
Peblo Custom ratings must be 50 characters or less
3rd September, 2008 at 09:07:42 -
MMF can't handle immense active objects without crying and stealing system resources. The walls are all backdrops. That math will work, and that's what direction I was headed in already, but how do I find that with a backdrop?
"Isn't it always amazing how we characterize a person's intelligence by how closely their thinking matches ours?"
Cast a ray towards the wall, finding the point of collision with it
create two 2 active objects, set on the perimeter of a circle, both initially facing back towards your ray
rotate each object in opposing directions until they both collide
depends on how you want to use it. It will just give the inbetween angle on corners, instead of an exact up or down, but thats only within a small pixel span; I used 8. If you really need 8 pixel depth on those intersections, you can have it run another set of collision points, further away, and compare the angles with its next in line. In general thats pretty unnecessary though.