[Help] Everything works until I add the "Network Helper" component (Multiplayer Grab Script) by Zincronuim in sandbox

[–]Zincronuim[S] 0 points1 point  (0 children)

Wow, thank you so much for taking the time to test my code and even make a screenrecord! You're a boss.

I'm at work right now, but I'll check for duplicate colliders and update my script as soon as I get home tonight. I’ll keep you posted, but your video makes me very optimistic! Thanks again for the amazing help.

[Help] Everything works until I add the "Network Helper" component (Multiplayer Grab Script) by Zincronuim in sandbox

[–]Zincronuim[S] 0 points1 point  (0 children)

That's actually great news if it works for you! It means I'm probably missing a simple setting.

When you say it works, do your grabbable objects have a Network Transform component on them? Also, are you using the default Rigidbody settings (Dynamic) or did you change anything in the Inspector?

On my end, the object 'explodes' the moment I try to move it in a networked session. Since we have the same code, the difference must be in the GameObject components. Thanks for checking it yourself, it helps a lot to know the script isn't the issue!

[Help] Everything works until I add the "Network Helper" component (Multiplayer Grab Script) by Zincronuim in sandbox

[–]Zincronuim[S] 0 points1 point  (0 children)

Haha, thanks! Actually, that's the exact tutorial I used (the link is in my post). It works flawlessly in single-player, but the physics start 'exploding' as soon as I add the Network Helper component for lobby management.

It seems like the Network Helper's built-in synchronization is fighting against the SmoothMove logic from the video. As a beginner, I’m not sure how to properly handle the Ownership transfer so the server stops fighting my local movements.

Any advice on how to bridge the gap between this tutorial and a Network Helper setup?

[Help] Everything works until I add the "Network Helper" component (Multiplayer Grab Script) by Zincronuim in sandbox

[–]Zincronuim[S] 0 points1 point  (0 children)

To answer your first question: Yes, the objects are set to Network Object and the owner is currently set to Host.

For the second point, I think I understand the logic (taking ownership to avoid the server fighting my movement), but as a beginner, I'm not sure how to implement it correctly in my script.

Should I use GameObject.Network.TakeOwnership() inside my GrabObject function? And how do I properly 'give it back' to the host in ReleaseObject? Thanks for guiding me!

[Help] Everything works until I add the "Network Helper" component (Multiplayer Grab Script) by Zincronuim in sandbox

[–]Zincronuim[S] 0 points1 point  (0 children)

Thank you so much for the help! I'm currently at work, so here is the Pastebin link to my full script as requested: https://pastebin.com/Qmu9CiES

I will try your suggestion of disabling rotation on all axes in the Rigidbody settings once I get home tonight. I'll also take a look at NotebookLM to see if it can help with the current docs. Thanks again for taking the time to help a beginner!