This example project demonstrates a flashlight scripting in WME. You can set various parameters of the flashlight in the beginning of flashlight.script (you will find the script in the "flashlight" folder in the project below).
Usage:
1) in your scene, create a dummy region called "foreground" and move it to the very bottom of the node list in SceneEdit
2) attach the flashlight.script to your scene
Currently the script displays the light cone at the position of the mouse pointer, if you want to display it at a different position, change the coordinates in the Update() function call in flashlight.script.
You can change the flashlight graphics for example to have a semi transparent edge around the light cone etc.
Download the demo project: http://dead-code.org/download/demos/wme_flashlight_demo.rar (~950 KB)
Requirements:
- WME 1.2.044 or later
- WinRAR 3.0 or later to unpack the archive

Usage:
1) in your scene, create a dummy region called "foreground" and move it to the very bottom of the node list in SceneEdit
2) attach the flashlight.script to your scene
Currently the script displays the light cone at the position of the mouse pointer, if you want to display it at a different position, change the coordinates in the Update() function call in flashlight.script.
You can change the flashlight graphics for example to have a semi transparent edge around the light cone etc.
Download the demo project: http://dead-code.org/download/demos/wme_flashlight_demo.rar (~950 KB)
Requirements:
- WME 1.2.044 or later
- WinRAR 3.0 or later to unpack the archive







Logged






Many thanks !!