Photon Bolt - Movement Command Help

byrdmic

New member
Any suggestions for using Photon Bolt's Command system for basic movement?

Right now I've got a custom LocomotionHandler that gets the horizontal, vertical, and delta yaw rotation in SimulateController and in ExecuteCommand I'm calling KinematicObjectManager.SetCharacterMovementInput and the YawRotation.

The issue I'm running in to is in the ExecuteCommand's resetState, I'm not sure how to tell the client to correct itself from the result sent back from the server. If I call KinematicObjectManager.SetPosition I get pretty significant jitter on the client. I've tried manually setting the characters FixedPosition in the KinematicObjectManager but still getting jitter from that as well.
 
I've been messing around some more just trying to see what works and what doesn't, and I've come up with at least a temporarily solution that seems to work okay when testing with a local server and local client.

I basically added some methods to the KinematicObjectManager and KinematicCharacter to get and set a characters current position. The client movement on both client and server looks fairly smooth and is accurate. I haven't testing using any client hacks or anything (still prototyping) but it seems to be good enough for now. Still open to any suggestions as I'll likely have to improve it and understand it quite a bit more down the road.
 
I haven't looked at Bolt in awhile so I won't be able to help much but I did make more progress with the non-deprecated UNET. What I ended up doing was sending the inputs to the server and then the server would tell each client where to move the character. For the local player I then had client side prediction setup so the character would not be delayed with the input. The KinematicObjectManager should not manage any remote player - it should instead have its own interpolation method and this is what I did for the PUN add-on.
 
No problem. I've got a solution working "well enough" right now. Using Commands (via Bolt) I'm sending the input to both the controlling client and the server. That is, I'm sending the input values to KinematicObjectManager on both. Both move; on client side for the "prediction" and on server side for the authoritative movement. Then for the result to send from the server to the client for correction, I'm assigning the KinematicCharacter's transform.position. Back on the client, I take returned position and set the KinematicCharacter's position on the client to this, and then call the AssignFixedLocation(true).

This is working well enough where the client movement is smooth, but the server is still completely authoritative.
 
No problem. I've got a solution working "well enough" right now. Using Commands (via Bolt) I'm sending the input to both the controlling client and the server. That is, I'm sending the input values to KinematicObjectManager on both. Both move; on client side for the "prediction" and on server side for the authoritative movement. Then for the result to send from the server to the client for correction, I'm assigning the KinematicCharacter's transform.position. Back on the client, I take returned position and set the KinematicCharacter's position on the client to this, and then call the AssignFixedLocation(true).

This is working well enough where the client movement is smooth, but the server is still completely authoritative.
I'm trying to do the same using a different multiplayer asset (Forge Remastered).
Could you assist me in integrating movement calls with the KinematicObjectManager ?

Even sharing a small code snippet on how input values are sent and commands are back and modify, would be very helpful !
Thanks!
 
Sure, I've got a custom component that I call BoltLocomotionHandler that replaces the UCC Locomotion Handler. I also only register the characters with the Kinematic Object Manager if they are the server or the client that controls the character. In my BoltLocomotionHandler component I gather the inputs on the client, send them to the server (and to itself) via Bolt Commands, then have a function on the handler to process the inputs. Which at this point is just taking the horizontal and vertical inputs and sending them to be processed by Move.

Then on the server I get the updated position and rotation and send that back to the client for any correction. That's the basic jist of it, but I'm actually in the process of rewriting the logic to be a bit more clear since I've done a lot of experimentation.
 
That's great to hear!
Thanks a lot for your reply.

Any direct way to contact you and continue discussing in the future?

Thanks,
Nisan.
 
Top