how to make light from a glower go through walls?

Started by eatKenny, November 09, 2014, 08:42:21 AM

Previous topic - Next topic

eatKenny

i'm try to make a spotlight tower based on the flare gun from "more weapon" by skullywag mod, to support home defending in darkness.

basic mechanism is: the tower shoots a invisible projectile to a postion, then it will deploy a invisible glower which lights up a certain area.

thing is, i want the light go through walls because it should come from a tower. is there anyway to do this or is there even a easier way to light up an area without a glower?

skullywag

Look at the glass mod in the release section it uas "walls" that let light through.
Skullywag modded to death.
I'd never met an iterator I liked....until Zhentar saved me.
Why Unity5, WHY do you forsake me?

eatKenny

thanks for the reply but what i need is a special light that go through walls not a special wall that let lights go through. it may need some hard core c# coding.

Rikiki

This spot tower seems really interesting! A shame you are already doing it... ;)

You might just try to add a "hidden" building on the target point:
* with a completely transparent texture
* with a glower
* no required energy
The hard part will surely be to capt the user targeted point.

If you ever give up this idea, please let me know, I might want to implement it myself. ::)

Do you plan it like that attached image?

[attachment deleted by admin: too old]

skullywag

Whats to stop you coding your own, no one owns an idea, Ive made spotlights (in many different ways) and all kinds of other mods personally just never released them as they werent that good. Nothing wrong with choice.
Skullywag modded to death.
I'd never met an iterator I liked....until Zhentar saved me.
Why Unity5, WHY do you forsake me?

mrofa

Problem on spawning stuff is that most of them are will be hex bound. So bullet in my opinion would be a best glowing source and since you did beams this shouldnt be much of a problem :D
All i do is clutter all around.

eatKenny

#6
this is what i've got after spending some time messing around with skullywag's flare gun(which is brilliant), for the spotlight glower i'm using a trasparent texture and (0,0) building size(so it won't overwrite the existing building/structure).



the one on the top is normal one, the glower on the right side is exactly "in" the wall, the glower on the leftside is a little outside the wall.

i can live with it but what i really want is, as i said, the light from this special glower dosent block by the walls, which is more realistic.

@Rikiki: yes it's something like a light tower. i'm very very new at c#, it's more a learning project than a real thing. you can just go for it, i'm sure you can do better job than me ;)


eatKenny

Quote from: mrofa on November 09, 2014, 04:24:43 PM
Problem on spawning stuff is that most of them are will be hex bound. So bullet in my opinion would be a best glowing source and since you did beams this shouldnt be much of a problem :D
that's exactly what i'm thinking ;), make a projectile glow and stay at impact position for a while, or, even better, move around with the target.

skullywag

I think you would have to loop over all the cells in the range and light them manually dont think a simple glower would work for this. Walls stop light from glowers full stop.
Skullywag modded to death.
I'd never met an iterator I liked....until Zhentar saved me.
Why Unity5, WHY do you forsake me?

Tynan

You'd have to actually touch the GlowGrid directly. I'm not sure if the interface even exists for this. I think not. Sorry. Though, if you really really wanted you could still do it using Reflection. It'd be hell to write, though. I'd recommend another project tbh.
Tynan Sylvester - @TynanSylvester - Tynan's Blog

skullywag

Tynan whenever im looking at the code and searching for stuff with lights i see a "spotlight" think its in the media library or something. It states it does shaped light. I dont know how unity does all the low level shiz it does but is that a useable thing? Or does it need to be written into your end?
Skullywag modded to death.
I'd never met an iterator I liked....until Zhentar saved me.
Why Unity5, WHY do you forsake me?

Matthiasagreen

This sounds to me like a mortar with a zero-damage zero-explosion projectile with 100% accuracy that has the same characteristics of a temporary floor lamp. Maybe try it from that angle?
Hi, my name is Matthias and I am a Rimworld Addict. It has been five seconds since my last fix...

mrofa

Um if thats a case that not a problem, just get my extended bullet thingy, and use spawn thing option to spawn a lamp
All i do is clutter all around.

skullywag

Glower would still get blocked by walls. Its not about the projectile its about the glower after its built at the final location. Hes using my flaregun to fire a bullet that where it landdls needs to light a circle up, it does this but walls obviously stop light so bar cycling over all squares in the circle and playing with the glowgrid theres not much anyone can do.
Skullywag modded to death.
I'd never met an iterator I liked....until Zhentar saved me.
Why Unity5, WHY do you forsake me?