Spawning Network Objects from the client | Unity Netcode For Gameobjects
Hey everyone, I'm using Unity's preview package "Netcode for GameObjects" com.unity.netcode.gameobjects 1.0.0-pre.4
Using Unity version 2021.2.7f1
Overall what I'm trying to accomplish is for the client to have no feeling of delay when firing projectiles. I used the sample package "Client Network Transform" which was attached to the player GameObject and it completely eliminated the movement delay that the client would feel. I am looking for the same effect when spawning projectiles.
Disabling interpolation doesn't help as the object itself is spawned slightly off from the player. (Since player movement is updated from the client)
My question is, how do I spawn objects from the Client Side without using [ServerRpc] (as this is the culprit the unnatural/delayed feeling)
While I understand it doesn't make a lot of sense to allow for a client to spawn objects, I guess I am hoping that there is a way to create network objects from the client side. If not, what's the best approach for spawning objects without the initial spawn delay when communicating with Rpc
Here's the link to the GitHub project (Using Unity version 2021.2.7f1) https://github.com/CurtisDH/CircleBlaster-Remaster/
Here are some links to the relevant documentation for the Unity package I'm using (Maybe I'm missing something obvious)
https://docs-multiplayer.unity3d.com/docs/basics/object-spawning/index.html
Your answer
Follow this Question
Related Questions
SyncVar works not always 0 Answers
ClientRpc Function not being carried out on clients in Unity3d c# 0 Answers
Issue setting player properties for other players on client side. 1 Answer
Download Multiple Images from Server and show in unity Images 0 Answers
[Solved]NullReferenceException in a ClientRpc method 1 Answer