Hello,
I’m currently experimenting with the new Server Authority / BindToSimulation system and I’m trying to implement a vehicle/turret aiming system.
I created an InputAction with an InputBinding using Mouse Position. On the client side, I correctly receive the mouse position as a Vector2 containing the viewport coordinates.
However, when I try to read the same input on the server during the simulation, the value is always:
Vector2.new(-1, -1)
Example:
local mousePosition = aimAction:GetValue()
print(mousePosition)
-- Server output: -1, -1
I understand that the server does not have access to CurrentCamera, but I was expecting the InputAction system to replicate the input value to the server, since it is part of the Server Authority workflow.
My questions are:
- Is
Mouse Positionsupposed to replicate to the server? - If not, what is the recommended way to handle mouse-based aiming with Server Authority?
- Should the client convert the mouse position into a world-space direction/ray and send that instead?
- Is there a recommended pattern for doing this inside
BindToSimulation()?
My goal is to have the server remain authoritative over the turret/vehicle simulation while still allowing the player to aim using the mouse.
Thanks!
