Display a black border

Hello all,

Today i’ve want to implement a black border to my game. let me explain : did you play the game zelda? Because of in zelda game when you press the Z button the camera looks at the object in front of the character or so if there is no object, it remains fixed behind the character and not moving. When you enter this mode, black borders appear at the edges of the screen. But in JMonkey, I do not see anything that could allow me to create these borders.

Do you have any solution ?

I’ve done this with rendering black polygons (rectangles) in ortho mode. Just make sure they are rendered before the UI is or else they will overlap the UI, unless that is what you want.

1 Like

Ohhh ok it’s much easier than what I thought ! I’ll try to do this.


Huuu sorry but after many attempts it’s impossible for me… What did u use exactly ?

Speaking for myself i use a box with black materials. And adapted his position and his rotation for it is in front of the camera. But when i come next to a building the blackBorder (box) is found behind the building.

It sounds like the building is possibly ignoring depth testing, or the black box is checking depth when it shouldn’t. The black box should be on the guiNode, that node uses a Bucket.Gui queueBucket.

So if the box is attached to the guiNode, and the building and rest of the scene is attached to the root node, then it should appear as you want it to.

Impossible i deleted my Class because I thought it was totally wrong… O___O

But now i found the Solution (LEVEL UP !!!) You have the eye of a professional. Thanks ^^

Glad it’s working :slight_smile:

Tatatatataaaa !