How to make an Object Clickable
This is from a post Robert the Rebuilder made. Dumped here by Andy Legate : )
Here's some rough steps to get you going. [Note to self and others: there really should be a Wiki tutorial on this!]
To create a click region: - Choose Scripts->Add->PyPRP, then choose "Add a (Generic) Logic Region". It will appear in layer 2. - Select it, then move it to the place where the avatar will be standing when they attempt to click on the object - Scale it so that it can encompass an avatar and the object that is clickable, then hit Ctrl-A to apply scale and rotation into the vertices - Rename the object to something meaningful (e.g. MyClickRegion) - On the Logic panel, click on Bounds, then set it to "Convex Hull Polytope" - Click the Actor button on the Logic panel
To make an object clickable: - Select the object - On the Logic panel, click on Bounds, then set it to "Convex Hull Polytope" - Click the Actor button on the Logic panel - Add the following AlcScript entry:
ObjectName: physical: pinned: true quickscript: simpleclick: pythonfile: myPythonFile region: MyClickRegion
But change "ObjectName" to your object's name, "myPythonFile" to the name of your python file, and "MyClickRegion" to the name of your click region.