![]() |
Attention | Topic was automatically imported from the old Question2Answer platform. |
![]() |
Asked By | rakmot |
For updating the movement, I use rpc_unreliable(“_set_position”, global_transform.origin) How would i use the same format to update the rotation of a character?
func _input(event):
if is_network_master():
if event is InputEventMouseMotion:
head.rotate_y(deg2rad(-event.relative.x * ms))
var x_delta = event.relative.y * ms
if camera_x_rotation + x_delta > -90 and camera_x_rotation + x_delta < 90:
camera.rotate_x(deg2rad(-x_delta))
camera_x_rotation += x_delta
rpc_unreliable("_input")
It is not working because it is not updating the character rotation. What can I do to resolve it?
rakmot | 2021-01-28 00:37