I’m new to JME3 and I have a problem with two objects that overlap at some point during animation.
The first object is a board like a chess board, the second is a cylinder similar to a hokey disc on top of the board. The disc has an animation that flip it around the z axis, when the disc is at let’s say 45 degrees a part of it goes inside the board and disappear.
What I need is the the disc is rendered during the whole animation. I tried to use setPolyOffset() to achive this with no results, then I realized that this works only for overlapping surfaces (correct me if I’m wrong please) and dosen’t work for me. Is there any way to see the disc part inside the board?
You might make the board semi-transparent.
The right answer might be just to raise the piece up so that it doesn’t penetrate during the flip. This would look the most normal I guess. Otherwise, if you get this to work as stated I think it will feel like the pieces are floating above the board… since you will have circumvented depth.
You can also turn off depth writing for the chess board and then nothing will ever penetrate it. But then you should take some care to make sure it is always rendered before the pieces and it might seem strange from certain angles (see above).
Thanks for the help it was really usefull, I tried both suggestions but I didnt like the results, I ended up changing the animation and making the disc move in the Y axis to avoid the overlapping.