I’m blocking on a light management problem. Let me explain:
In the game, the level is composed of different rooms, lights are arranged in some rooms
For a light in a room does not influence a room or a corridor nearby, each room is a child node that is added to rootNode. (to prevent the light from crossing a wall since the light will influence only the sub-graph for which it is associated)
but:
When a character moves between different rooms and corridors, I would like the lights to affect the character as well. But since the character is not part of the subgraphs of the different rooms, he is never enlightened.
Put the character in the room. That’s where he is. It makes sense. You moved everything else anyway. Why leave out the char? You even have the room object.
I think I’m going to copy the lights in a subfile dedicated to the characters or add a light to the character when it enters the room (even if this second solution will certainly pose graphic problems, there is a risk of an inconsistency if the lights of different colors are too close together).
JME and AppStates have the event loop so you can move a character between frames to wherever you want. Are you afraid that if you make a copy of the character, it will loose it’s soul? It’s pass by ref. The soul will go along with it. (I’m chuckling to myself. I started playing LOTRO - an MMORPG - and was afraid that I could do something that would permanently kill (delete) my character. I didn’t want to swim in a virtual lake, cause I thought a virtual sea monster would eat me and delete my toon.)
Go ahead, beam him down.