I’m making a 3D editor, but I’m wondering how to implement the 3D cursor (the up,down,left) arrow.
This cursor doesn’t occlude or can’t be occluded. With opengl, I usually draw the scene in 2 passes. during the first pass, I draw the scene. Then I clear the depth buffer or disable depth testing, and draw the cursor.
this way, the cursor will be always on top of everything. How do I do it with playcanvas?
I tried it, it didn’t work well. I can’t disable occlusion . I unchecked depth test, but it made the object disappear.
I’m also very confused by “layers vs. sublayers” . For example, I create a cube and I want to assign it to the Immediate opaque layer, but I can’t. I don’t know why.
I’m sorry, I don’t know if you can visit. I’m new to PlayCanvas.
In this project, there is an object, called “Model”. That is supposed to be the cursor. But it’s transparent due to layer problems. I want it to be opaque and I don’t want it be occluded by anything.
I found the information hotspot project might be a good start point, however, I can’t seem to be able to add script into the scene, as the button is grayed out;
But I believe I have found another rendering bug. As you can see, both arrows are red. I wanted to create another material in blue for one of the arrows.
Then, I saw weird issues. I simply duplicated the red material without any changes, and the new material can’t be rendered. it disappears in both the editor and the production viewer: