You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
I've created multiple props in the LitiUtil the render type is none and collision is false. Now I want to change the render type while playing the game.
So is used the following code:
for (Prop prop: Game.world().environment().getProps()){
prop.setRenderWithLayer(false);
prop.setRenderType(RenderType.NORMAL);
}
This didn't worked so I tried debugging it. The props will be queried right, so I think the foreach-Loop is right.
A bit clueless I tried to change other things of the props.
When I tried changing the collision this also doesn't work, but changing the x-Position worked.
I also tried using the for loop at different location like right after Loading the environment, Game.world().onLoaded, in the renderer.
But this didn't changed problem.
Maybe I'm doing something wrong but at the moment I don't know what.
Expected behavior
Rendertype and collision can be changed at runtime
Your System:
OS: WIN-10
LITIENGINE version: litiengine:0.5.2
Java JDK/JRE version: JDK 21.0.1
Screen resolution: 1920x1080
The text was updated successfully, but these errors were encountered:
Setting RenderTypes at runtime indeed did not change which collection of renderables an entity was stored in, despite the entity's RenderType attribute changing successfully. I've made sure that the environment is now handling this properly.
Describe the bug
I've created multiple props in the LitiUtil the render type is none and collision is false. Now I want to change the render type while playing the game.
So is used the following code:
This didn't worked so I tried debugging it. The props will be queried right, so I think the foreach-Loop is right.
A bit clueless I tried to change other things of the props.
When I tried changing the collision this also doesn't work, but changing the x-Position worked.
I also tried using the for loop at different location like right after Loading the environment, Game.world().onLoaded, in the renderer.
But this didn't changed problem.
Maybe I'm doing something wrong but at the moment I don't know what.
Expected behavior
Rendertype and collision can be changed at runtime
Your System:
The text was updated successfully, but these errors were encountered: