Remove elements at runtime

If you have the VastPark Player installed, click download the example IMML file below and open the demo in the VastPark Player.

Overview

Shows how to remove elements from the scene during runtime. Useful to optimize performance.

Instructions

Click the box to remove it.

Walkthrough

This is a straightforward example.

1 <Script Name="RemoveElement">
2 function main(obj, args)
3    scene:remove(obj)
4 end
5 </Script>

The script above calls the scene's remove function for the object, in this case it is the object which has the trigger attached to it. This removes the element from the scene.

remove-elements-at-runtime.imml - Requires Player v1.2 (476 Bytes) Tim Glew, 01/13/2011 07:53 am

removeElementAtRuntime.png (66.5 kB) Ian Tan, 02/22/2011 04:23 am