Server instantiate object with player id

Options
Hello,

My problem is this:

I want player to shoot a projectile and use photonView to synch it. I'm having problems with local instantiation and tracking the projectile. Collision detection being the main problem, as no forces are used. Just modifying transform.

It worked like this: Player presses fire button -> RPC is sent to everyone -> Rocket is instantiated locally for everyone at the correct position and velocity. Collisions are checked everywhere, however server decides if someone was actually hit. Collision detection here is a problem. If someone shoots a projectile too close to a wall, the projectile just flies through in most cases.

So I decided to try out photonTransformView for synching. This time I want to use PhotonNetwork.Instantiate, add necessary forces (thus, using physics instead of modifying transform). And I hope this fixes collision detection issues.

So I would like it to work like this: Player presses fire button -> RPC is sent to the server -> Server does PhotonNetwork.Instantiate and adds forces -> OnPhotonInstantiate is called on rocket and necessary sfx and vfx are played locally on each client.

The problem is that this rocket now does not have an owner. Earlier, I sent player ID with the rpc and everyone knew who the rocket belonged to. Currently I don't know how to assign a player ID to the rocket. I wouldn't want to waste another RPC to tell everyone who the rocket belongs to. I'm wondering though, if it is possible to use the OnPhotonInstantiate's argument PhotonMessageInfo info? Is it possible to write the id there and get it in the instantiation callback? If it is, then how?

So the final workflow would look like this: Player presses fire -> Server does PhotonNetwork.Instantiate -> playerId is encoded into instantiation's callback info -> OnPhotonInstantiate is called on all clients with the info paramater, which contains player's id who shot the rocket.

Thank you!