Rendering "non visual object" in mission editor
by John Eric Miller · in Torque Game Engine · 03/26/2004 (8:51 am) · 2 replies
I am trying to find out how non visual objects are rendered in the mission editor such as the spawn sphere etc. I want to be able to create my own non visual objects in the editor. I would also like to add the ability to resize the objects, disply the movement axis, display the name and ID.
A high level explanation on how this is done for trigger would be useful. I just some guidance to know where in the code to look.
Thanks!
A high level explanation on how this is done for trigger would be useful. I just some guidance to know where in the code to look.
Thanks!
#2
03/26/2004 (12:35 pm)
You might also want to take a look at the fxRenderObject resource, which I believe is a stripped down absolute basic object for rendering in game.
Torque Owner Josh Albrecht
RenderObject is an empty SceneObject function that must be replaced with however you want to draw your object. Take a look at the implementation of renderObject in ShapeBase, which MissionMarker is derived from. Specifically, look at the section towards the end that checks if(!(mShapeInstance) || gEditorEnabled) or something, and uses wireCube to draw boxes to represent the bounding box of the object.
Hope that helped somewhat! :)