How can i show a small world axis on the screen like this、



You can use AxesViewer:

but i can’t find any method to render to screen like a picture

What do you mean? You also want the X/Y/Z texts?

This snippet should do it:

emm,in fact,i used rtt implement that before by three.js,but i don’t know how to do with babylon;
and rtt is complex.
i need a img to guide the user to the world coordinates

in fact ,i wonder if there are more easy way to implement that without CustomRenderTarget

I think you should create a PG, I don’t really understand what you want to achieve…

If you want the axis to stay fixed on screen, this could help: How to get Fixed AxesViewer in Left Bottom - #5 by dineshax100

yean,that’s how it feels,let me try it,thanks

I want to know why these three vectors

maybe it just like a clip plane??? Or maybe these are related to the camera parameters

I got what I wanted by adjusting the parameters,However, in my project, the parameters need to be adjusted further

Yes, those vectors are just offsets from the camera position where to put the axis. So it will depends on your scene / settings.

1 Like

Line 19,if i use the rightHandedSystem,i have no idea to adjust the new position according to the camera’s position
i tried some times,but I didn’t get the right result,maybe you can help me @Evgeni_Popov ,thanks

You have to negate the z value in p.addInPlace(camera.getDirection(new BABYLON.Vector3(0, 0, 15)));:

1 Like

thank you very much!!!