base model usage question
Posted: Mon Mar 09, 2020 6:02 am
does anyone have an example of the usage of baseModel?
the problem i have is: say there is a model named "base" and two other models named "player" and "enemy" which both use "base" as their base models. If I want to change the player's renderMesh component which is located inside "base" when pressing a key, what should I do? I tried changing the value of the Mesh by calling MyRender.Mesh=MyMesh, but soon realized when MyRender is outside of the player model, changing its value doesn't affect the one in the current "clone", as the ZGE help says. However, this doesn't match my expectation, because when i test this for variables they change separately between "player" and "enemy" model...why component value can't while variables can?
Or maybe basemodel is useful for variables only?
can anyone please explain? thanks a lot
the problem i have is: say there is a model named "base" and two other models named "player" and "enemy" which both use "base" as their base models. If I want to change the player's renderMesh component which is located inside "base" when pressing a key, what should I do? I tried changing the value of the Mesh by calling MyRender.Mesh=MyMesh, but soon realized when MyRender is outside of the player model, changing its value doesn't affect the one in the current "clone", as the ZGE help says. However, this doesn't match my expectation, because when i test this for variables they change separately between "player" and "enemy" model...why component value can't while variables can?
Or maybe basemodel is useful for variables only?
can anyone please explain? thanks a lot