3D / 2D Translator

NOTE: This is an extension designed to work specifically with the software GameMaker: Studio 2.2

View the online documentation to explore the available functions.

Who would have thought that clicking on something in 3D is such a pain? Well, let this extension fix you right up.

What is UBG 3D2D Translator?

UBG 2D3D Translator is a 3D mouse-interaction extension. It gives you the ability to monitor multiple view ports and translate data between 2D space and 3D space (and back) thus providing you with the tools to click on 3D objects and project 3D points onto a 2D HUD.

What Does This Extension Provide?

This extension provides you with a means to create a "translator" that will act as an intermediary from one space to another. It can either generate a 3D ray from a 2D point or a 2D point from a 3D point.

Also included are several ray / shape intersection scripts to allow you to check things like mouse position against triangles, blocks, or even vbuffer meshes. You are also provided a way to project your ray onto an infinite plane for things like 3D object placement.

In the case of mesh detection, not only does it automatically check bounding-box collisions first for speedier detection but it provides extra data such as the specific triangle ids and coordinates that were intersected.

Do I Have To Change My Rendering System For This?

Not at all! The translator does require that you provide your renderer's projection matrix, view matrix, and active viewport. As such, you will need to have your camera data accessible but past this it doesn't change or affect the rendering system at all.

Support

Everything is written in native GML that is compatible with all platforms. GMS2 specific language features are used so this is not compatible with GMS 1.4.

Purchase

FREE

This product is distributed under the MIT License.