0 votes

If you have something in a scene that has two completely different appearances, but the same underlying data (ex: hitpoints), what do you do?

  1. Have one node that can switch its draw commands, textures, meshes, materials. etc. to look different on command.
  2. Have two nodes, one for each appearance, and make one visible and hide the other as necessary.
  3. Have two nodes, one for each appearance, and load one node tree and remove/free the other as necessary.
  4. Something else...
asked Aug 9, 2019 in Engine by goshot (64 points)

1 Answer

+1 vote
Best answer

If I were you, I would choose option #2 for it being the easiest. Option #1 is tedious and you should use it only if your objects are extremely modular in nature. For example, imagine making a Dress-Up game or even a simple character customization system. You wouldn't want to create thousands of nodes for every possible combination. Instead, you would want to create a base node and have the code alter the different aspects of your objects via draw calls, mesh swapping, texture modifications etc.

For a small project, you could just hide and show the premade nodes. If your character has two skins, make two nodes for them. You can also disguise the fact that you alternate between two or more versions by adding animations and particle effects.

answered Aug 10, 2019 by johnygames (1,574 points)
selected Sep 5, 2019 by goshot

Thanks. My concern with #2 is visibility flag only controls visibility. When nodes remain in tree, they can still interact with other logic, like overlapping checks.

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.