Floaty object tracking

Hello, I'm trying to track objects through Photon, I need them to hit the same spot for all players, say throwing an axe or a dagger into a target. Whenever a player lets go of said object it becomes "floaty", it moves but in a laggy / unresponsive way. Even when dropping an object and watching it fall it falls slower than the gravity should make it fall. Tried searching here and on Discord but haven't found the same problem mentioned.

A visual exmaple: https://youtu.be/1iXpLj-oMKQ

Comments

  • devonlively
    edited December 2021

    I think the reason it seems to move so slowly is that it interpolates to the position thats being sent back and forth from client to server to client. To make it more accurate im not sure. An idea would be to rpc the axe to move the same way on all client, and when it hits on the original client just rpc its location to the other clients. There is more than likely a better way to do this. too bad there isn't many people on these forums to help out. 100% appreciate those that do!

  • Yes, the problem is related to interpolation and the updates for it. It's not moving physically correct, as one player has control (does the simulation) and then sends messages to the others where the object moved.

    You can treat it as shooting: Send an RPC that the dagger gets thrown, when, where and in which direction. Then everyone can just simulate the path and hit the correct object.

    Alternatively, there is an asset in the store, called "Smooth Sync". It may give you better results than you got now. I heard good stuff about it.

  • Well put. Much better than I could lol. For the record, I use smooth sync. Works like a charm. Well worth the 10 bucks.

  • Thanks guys, I'll look into that, the object is being treated as a rigidbody but I was tracking it through its transform due to needing for it to end up in the same place / rotation.