City Sample Vehicles Lights

Hi,

Can you direct me into how to turn on/off the headlights and brake lights on the City Sample Vehicles?

Thanks

Hi @JerosBer,

It looks like you’ll need to do a bit of setup yourself for this in the City Sample Vehicles. (The actual ‘CitySample’ project’s brake light setup is a big can of worms with lights driven by a float hashing system)

Big picture is that you can ‘brighten’ emissive colors by multiply them by a scalar value.

Then the idea is to communicate with the multiplier value when the brake is pressed.

(It’s checking on tick in that image, but could also be set to work directly with the Input Axis/Event you’re using with brakes)

Let us know if anything is unclear!

1 Like

Hi @Astrotronic , do you know how to turn on the car lights (headlighs, police lights ecc)?
I migrate the car in another project and I would like to turn on the light, even if the brake button is not pressed (I have to do a bullet time shot in Unreal).

Thanks

Hello, welcome to the Forums.

For headlights - I’d just attach spot-light components. With the brakes, you can set up a material like the one above, but instead of having ‘1’ as the default ‘BrakeEmissive’ parameter, set it to 100. Then if you apply that material to the brakes it will be bright all of the time.