0

I am making a multiplayer game using Unity Netcode. When my player object approaches a planet object, I want to parent the player object to the planet so it moves with it. How should I do this please?

Trying to use RPCs, it seems to be difficult to get it to happen when playing as the client. I have no idea how to do it properly and can't find suitable tutorials.

12
  • In general physics in networked multi-user experiences is always a big topic ... If you do physics server sided the own client will always have uncanny delays - however for something like your planets the physics can not be handled client sided ... Commented Jul 9, 2024 at 16:07
  • So are you saying that reparenting to a moving object will never work? Commented Jul 9, 2024 at 16:12
  • Be careful dual-tagging a question with C and C++ tags. You're apt to incur the wrath of the denizens of the tags unless your question is about the interoperability of C and C++. I think you should choose one of the two language tags and delete the other. Your call on which language you're primarily working in. Commented Jul 9, 2024 at 16:13
  • I recommend you visit Game Development before posting there. Commented Jul 9, 2024 at 20:00
  • You want to attach your player to the planet. The planet can have multiple containers, such as one for orbiting objects. Have the planet develop a method where it appends a player or other object to one of its containers; maybe prefer one method per container. Commented Jul 9, 2024 at 20:02

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.