0
\$\begingroup\$

I'm developing an educational game whose main mechanics are not multiplayer-oriented. However, I would like to add a feature that allows the teacher to enter the game and all students can see him, but no student can see the other students. Is there a way to do that?

\$\endgroup\$
1
  • 1
    \$\begingroup\$ If you know the ID of your teacher (even easier if you make them the master in a p2p game), then it should be easy to turn their avatar/model/character's renderer on and just not turn on the other players. I think if you have questions like this though, you definitely need to look into the architecture of networked games more though... \$\endgroup\$ Commented Feb 18, 2020 at 2:44

1 Answer 1

-1
\$\begingroup\$

If one object (teacher) could be seen by others (students) - it is multiplayer game.

If you want to students couldn't see each other - this is details of realization of multiplayer game.

Therefore, yes, there is a way to do that:

Packets about teacher send to all students. Packets about students send only to teacher, but not to another students.

\$\endgroup\$
1
  • \$\begingroup\$ This answer would be even better if it gave some guidance about how to control which packets get sent to whom in a Unity multiplayer game. \$\endgroup\$ Commented Feb 18, 2020 at 10:26

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.