Extra week! Please support Principia in the August 2026 Donation Drive to ensure the continued maintenance of the game and website.

Query and Raycast Example

By sdac – Custom level – uploaded 11 Feb 2014 from Windows

Where to play?

Revision #2, updated N/A
PlayEdit 5 players liked this.
Issues trying to play levels? Troubleshoot issues playing levels

Left lua object does a world query to find nearby objects, and then draws a line to it.

Right lua object does a raycast to the left, it ill light the connected debugger 50% when it detects any object, and 100% if the detected object is a robot. Note that raycasts end at the very first object, like the laser.

Please note that there's a bug with the layer checking of both raycast and query so you'll have to wait until tomorrow (1.4.0.1) for the layer arguments to work. Do not pass them at all for now.

Downloads: 281 - Level ID: 2676

Comments

No comments have been posted. Be the first to comment!