blueprint

UE5 Example - OSC Setup Controls

  • Exposure: public
  • UE Version: 5.0

avatar author

maxHarrison

July 14, 2022, 3:48 pm

Create a Blueprint > Actor. Remove the events that are in the event graph and paste this code into it.

Create a Blueprint > Blueprint Interface. Rename the NewFunction_0 to triggerLight. Click Add (Top Right) > Function and name it controlLightBrightness.

Add this blueprint to the scene (can be placed multiple times, the blueprint will look for all lights that have the interface applied). Feel free to change the lights colours.

This OSC blueprint also has control for the sun rotation, to set this select the OSC blueprint and in the details panel look for Light, click the drop down box and select the sun light 'Light Source' and in the Sky Sphere drop down box select the 'BP_Sky_Sphere'.

Any time the suns rotation is updated it refreshes the BP_Sky_Sphere material to set the sky material to reflection the suns position in the sun as it does in the real world.

OSC Controls: /uespottoggle - Toggles the spotlight/s visibility /uespotbrightness - Sets the intensite value of the spotlight/s placed /uesunrotation - Rotate the sun light source on the Y axis (Over Head)

Click the button above, it will automatically copy blueprint in your clipboard. Then in Unreal Engine blueprint editor, paste it with ctrl + v