Hello Everyone,
I have a requirement of showing co-ordinate axes at a corner of viewport in my application during runtime just like in the editor as shown in image.
Is it possible to make it happen during runtime?
Thank You!
Hello Everyone,
I have a requirement of showing co-ordinate axes at a corner of viewport in my application during runtime just like in the editor as shown in image.
Is it possible to make it happen during runtime?
Thank You!
Here is a comment from this post: How can I render a static mesh in the corner of the screen?
jwatte Engine Contributor
There are a few ways to do this.
The simplest is to make your object a child node of the active camera node.
The next simplest is to set up a camera that renders the object to a render target, and the paste the render target texture in the corner.
The third way would be to use “custom depth stencil” render pass shenanigans. Most of the tutorials for this is on “how to render object outlines,” but it can be used for a bunch of other effects, too (including compass roses and other such overlays.)
You would simply need to attach the proper code to move the gizmo in the direction you desire based on the forward vector of the camera.