How to display object always over other objects

Can this be done in playcanvas?
I’ve got a solid model (cube) and want to display an object (in this case a line) through the object. The crossing of the lines in the picture is in the middle of the object.
How do i do this?

This should do the trick: convert your centerpoint of the blue box via
camera worldToScreen(worldCoord, [screenCoord])
and make the red lines an overlay in a 2D overlay

Or check out what Will is doing with the textfields and their position:

https://playcanvas.com/project/324696/overview/introducing-iphone-6

I want the lines to be in 3d space in the same space, not in a GUI overlay.
What i want to display is a city with houses and some (power/hot air) lines that go from the houses through the ground to a power-plant (for instance). So the lines need to be visible even if the go through the houses or through the ground.

On the object that you want to be in front, remove Depth Test and Write on the material of the object and make sure that object is drawn after all the other objects that you want behind by changing the render layer.

Look at the reticle in WebVR Labs for an example: https://playcanvas.com/editor/scene/484674

My lines contain a material (texture). I’v disabled the depth-test, but now my object is not visible anymore.

Can you share the project?

Thanks, i’ll try that.

Yep, works now! Great stuff, thanks.