Home LittleBigPlanet 2 - 3 - Vita - Karting LittleBigPlanet 2 [LBP2] Help!
#1
Light Sensor?
Archive: 10 posts
Heya, long absence. Does anyone have a great design for a light sensor? It would need to output proximity values. It's meant to be used in a stealth game where you must avoid light to prevent discovery. Top-down Right now, my design is to place light tags on all light sources, and obstacles tags on all things that block light. If Light - Obstacle tag strengths is +'ve then detected, and if -'ve then hidden. 4 sensors around player in each direction for cases where they are next to an obstacle but it is not between them and the light. Was considering using 8 directions, but that seems a few too many than is necessary. Better ideas anyone? | 2011-12-13 13:42:00 Author: SSTAGG1 Posts: 1136 |
I'd do it the other around, put the tag on your player and the sensor on the light source. Seeing as you can select the radius size and arc you want for tag sensors this means you can set the area exactly. If you have a light source with multiple obstacles in the way you can instead put all sensors on a microchip so you have a 360 degree area covered with however many obstacles accounted for. When the tag on the player hits any sensor, wirelessly transmit that back to the player or whatever it is you need to sense this info. | 2011-12-13 14:09:00 Author: Xaif Posts: 365 |
That would work perfectly if only the lights remained stationary (and the obstacles for that matter). Guards will be moving about and such, but static objects would be fine. | 2011-12-13 14:22:00 Author: SSTAGG1 Posts: 1136 |
Instead of light, just use yellow hologram or sticker panel, put a player sensor on ot for the range and your good to go. | 2011-12-15 02:19:00 Author: Undarivik Posts: 442 |
I would place sensors on the light, one called "obstacle" and a player sensor. Sensors detect the range of the closest object of the tag. If there's any "obstacle" detected, it will detect the closest one. Using this, you can compare the signals of the two sensors. If the player sensor's signal is smaller than the obstacle sensor's signal, it means that the player is hidden. If both signals are equal, either your sensors have a too wide radius so they can't detect if the player is in front or behind the object (a quick fix is to set the sensor's minimum range to 0.1), either they are both at 0 (no player nor obstacle). If the player sensor outputs a stronger signal than the obstacle sensor, it means the player is closer, so in front of the light. You can also extend that system to layers (I think player sensors do have the "same layer" thing). Now how to test which signal is the strongest? You won't have any negative, so it's easy. Just use a combiner to subtract one signal from another. Then, use a splitter. If you had 20 and 40, 20-40=-20. Splitting again will output 20 from the negative. Then you just need a analogue-to-digital conversion (a sequencer set to positional is perfect). Now if the signal comes out of positive, the signal that goes in the positive is the greatest. The opposite is also true, with a signal coming out of negative telling you the signal input in the negative of the combiner was the biggest. I have a setup of this in my Health Meter Toolkit... And a 2-way one too! Wait, I might have a lbp.me pic... Ah nope, the pic I have has 3 signals compared to tell which is biggest. (note, the OR gate outputs biggest signal, the AND gate the lowest) Alternatively, you could use impact sensors combined with tags, but then... it's not my domain. EDIT : Undarivik : you didn't read, hun ? he needs to detect the player only if he's not hidden. That wouldn't work, not that simply. BTW, there's an object in the light category from the MGS pack which works as a light and a player sensor, but it passes through obstacles. | 2011-12-15 02:27:00 Author: Unknown User |
My goal is to create a very dramatic atmosphere for the level. The lighting effects I've been able to achieve are just too good to give up for hologram. Also, hologram would have the same issue with the dynamic lighting I'm going to use (as with panel). pivottt, the problem with your design is that the player must be closer to the light than the obstacle. What I need is something dynamic to detect the positions of the player and obstacles and determine if they interfere. The player could be standing next to an obstacle, in the light, and must be detected. Something else I've been considering is to use an emitter which looks at the player, located on each light. When within range, the emitter will send 'light' projectiles (invisible during play) at the player, and if the contact anything they destruct. My concern with this is there will be too much of a delay when the player can move out of the way. If I make the projectile too fast though, the impact sensor will not activate properly (at least from my experience with them before). Detection this way would occur if the light hit the player. I don't really like this though, since that means emitters, and I hate emitters.... Next time I have some time to experiment I'll give my results. Hopefully with pics (since everyone likes pics ). I've got a great picture of my current test, but haven't uploaded it. It should help explain my predicament. Don't take me too harshly, I'm glad for the input. I didn't even consider using preset angles for the sensors, and will probably use that for something. Also, no need to explain the logic to me, but thanks for the extensive tutorial. I've spent more time making logic than playing levels . Just looking for ideas on how I might go about this differently, if they even exist. | 2011-12-15 05:56:00 Author: SSTAGG1 Posts: 1136 |
the problem with your design is that the player must be closer to the light than the obstacle. What I need is something dynamic to detect the positions of the player and obstacles and determine if they interfere if the player is not closer to the light than the obstacle, it means the player isn't hidden if not, the player is hidden. I see what you mean if the light is a circle (in all ways), it won't work because there could be an obstacle right over the light and the player could be under it. but if the light is a projector or something in one way only, there's no problem with my design. I didn't consider that, I kinda imagined you used projector lights or similar. Then what kind of light will you have? | 2011-12-16 01:30:00 Author: Unknown User |
First of all; welcome back. The way I read this is the light actually makes the player 'detectable' by the guards. So the light should trigger the four tags when over the player, these tags could have AND gates involved with an inverted 'obstical' tag sensor set to 90 degrees (one direction) with a small radius. The guards need to have sight cones in each direction. So if the look down they react to an on up tag. Which will only be off if the player is standing on the down side of a block. ... or something... | 2011-12-16 06:06:00 Author: Mr_Fusion Posts: 1799 |
First of all; welcome back. The way I read this is the light actually makes the player 'detectable' by the guards. So the light should trigger the four tags when over the player, these tags could have AND gates involved with an inverted 'obstical' tag sensor set to 90 degrees (one direction) with a small radius. The guards need to have sight cones in each direction. So if the look down they react to an on up tag. Which will only be off if the player is standing on the down side of a block. ... or something... Hah, you're one step ahead of me . Yeah, the end result will be that light allows for detection by guards/etc. Still have the problem with light properly triggering the tags. If you'd like a better idea of what I need: Change darkness to ~max, place a light down, and place a small block in its radius. The shadow is 'safe' for the player. Still haven't had a PS3 to test these ideas . | 2011-12-16 13:32:00 Author: SSTAGG1 Posts: 1136 |
In regards to triggering the light... even if they are moving they can be placed on a column of tagged invisible holo that moves as part of the light setup. The actual column could be the circular with the same radius as the light, but made out of four pie wedges for each side. A setup of impact sensors set to tagged and include touching should be sufficient to know when a player is within the light's radius, as well as which side is casting a shadow (as it will be touching a block on one of it's sides). | 2011-12-16 21:22:00 Author: Mr_Fusion Posts: 1799 |
LBPCentral Archive Statistics
Posts: 1077139
Threads: 69970
Members: 9661
Archive-Date: 2019-01-19
Datenschutz
Aus dem Archiv wurden alle persönlichen Daten wie Name, Anschrift, Email etc. - aber auch sämtliche Inhalte wie z.B. persönliche Nachrichten - entfernt.
Die Nutzung dieser Webseite erfolgt ohne Speicherung personenbezogener Daten. Es werden keinerlei Cookies, Logs, 3rd-Party-Plugins etc. verwendet.
Die Nutzung dieser Webseite erfolgt ohne Speicherung personenbezogener Daten. Es werden keinerlei Cookies, Logs, 3rd-Party-Plugins etc. verwendet.