The Box Component requires the ability to trigger the TimelineComponent when an Actor enters its collision bounds.Īdditionally, the PointLightTimeline will require update logic in order to change its luminosity and color. ![]() Your completed color track will appear as it does below.Ĭreating the Collision Overlap Event and Update Logic Modify the second color key with a time of 5, and RGB value of: ( R:0, G:0, B:0). Name the new color track LightLinearColorTrack.ĭouble-click the first color key to modify it with a time of 0, and RGB value of: ( R:1, G:0.665, B:0.015). When the player overlaps with the light Actor's box component bounds, the PointLight Timeline will require a linear color curve track to manipulate the point light component's color property.įrom the Timeline Editor add a color curve track. The completed LightBrightnessFloat track will appear as it does below. ![]() Assign one key a time-value (0,5000), and the other key a time-value of (5,0). Name the float curve track LightBrightnessFloatTrack, and shift-click to add two keys to the track. The luminosity will have an initial value of 5000 and will decrease to 0 over the span of 5 seconds.ĭouble-click the PointLightTimeline node to open the Timeline Editor and add a float curve track. When the player overlaps with the light Actor's box component bounds, the Timeline component will require a float curve to manipulate the point light component's brightness value. Name the variable BrightnessMultiplier, compile and set its Default Value to 20.0. Navigate to the My Blueprint tab and from the Variables category, click the + Variable button to add a new variable of type float. Open the Event Graph, right-click the graph, and choose Add Timeline from the Blueprint Context Menu. This will be done using a Point Light Component containing a Box Component to serve as an overlap trigger and a Timeline component to manipulate the Point Light Actor.īegin by creating a New > Games > Blank > Blueprint project named FadingLights.Ĭlick the Add/Import button to create a new Blueprint Actor class named BP_LightActor.ĭouble-click the BP_LightActor from the Content Browser to open it in the Blueprint Editor and open the Class Defaults.Ĭlick Add Component, select Box Collision from the dropdown menu, and rename it to OverlapCollision.įrom the Components tab, select and drag the overlap collision onto the DefaultSceneRoot to make OverlapCollision the new Root Component.Ĭlick Add Component, search and select Point Light. This document describes how to set up a light Actor that changes color and slowly fades away on contact.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |