Mindbug
Joined: Sun Oct 29, 2006 7:17 pm Posts: 50
|
Door SensorRay offset problem
Ok, i have messed alot with my door here, but i can't seem to get the door to open, when i get near. I think i have misunderstood how the startoffset and sensorray offset works. Is there anybody who could explain how it works? I mean the part about HOW it works, not offsets.
|
Grif
REAL AMERICAN HERO
Joined: Sat Jan 27, 2007 10:25 pm Posts: 5655
|
Re: Door SensorRay offset problem
Mmm, that's a nice nonexistent attachment.
Anyways, as far as I understand it, here's how the Sensor Ray offset works.
So, the Open Offset, Closed Offset, and Open Closed Offset all originate from one point. I don't know what it actually IS, but, they are all one point. In this twisted offset, positive X moves you to the right, negative to the left, positive Y moves down, and negative moves up.
Now, Sensor Ray is an especially odd function. It draws a sensor area for the device using a line, which uses the two offsets available.
The offsets for the start and end points of this ray have the same origin as the Open/Closed/OpenClosed offsets.
Meaning that, if your door is, say, (0,0) closed and (0,48) open, a good sensor ray offset to use would be (24,-24) to (-24,-24). This would draw a horizontal line, which extends 24 pixels out from the door, 24 pixels into the air.
24 is used because it's the default tile size in CC.
|