diff --git a/proto/decentraland/kernel/apis/restricted_actions.proto b/proto/decentraland/kernel/apis/restricted_actions.proto index 5fe63d9f..fb8bc648 100644 --- a/proto/decentraland/kernel/apis/restricted_actions.proto +++ b/proto/decentraland/kernel/apis/restricted_actions.proto @@ -48,7 +48,17 @@ message SuccessResponse { message TriggerEmoteResponse { } -message MovePlayerToResponse { +message MovePlayerToResponse { + bool success = 1; +} + +message WalkPlayerToRequest { + decentraland.common.Vector3 new_relative_position = 1; + float stop_threshold = 2; + optional float timeout = 3; // max seconds before the request is failed; not passed to the movement scene +} + +message WalkPlayerToResponse { bool success = 1; } @@ -79,6 +89,12 @@ service RestrictedActionsService { // whole interpolation being completed or interrupted (e.g: by input movement) rpc MovePlayerTo(MovePlayerToRequest) returns (MovePlayerToResponse) {} + // WalkPlayerTo will walk the player to a position relative to the current scene, + // managed by the movement controller scene. Returns success when the player reaches + // within stop_threshold distance, or false if the path is blocked, the player gets + // stuck, the player interrupts the walk with manual input, or the optional timeout expires. + rpc WalkPlayerTo(WalkPlayerToRequest) returns (WalkPlayerToResponse) {} + // TeleportTo will move the user to the specified world LAND parcel coordinates rpc TeleportTo(TeleportToRequest) returns (TeleportToResponse) {} diff --git a/proto/decentraland/sdk/components/avatar_movement.proto b/proto/decentraland/sdk/components/avatar_movement.proto index 27a3a7c6..74851531 100644 --- a/proto/decentraland/sdk/components/avatar_movement.proto +++ b/proto/decentraland/sdk/components/avatar_movement.proto @@ -9,8 +9,9 @@ option (common.ecs_component_id) = 1501; message PBAvatarMovement { decentraland.common.Vector3 velocity = 1; - float orientation = 2; // 0-360, we don't allow pitch/roll + float orientation = 2; // 0-360, we don't allow pitch/roll optional decentraland.common.Vector3 ground_direction = 3; + optional bool walk_success = 4; // set for one frame when a walk_target ends: true = reached target, false = failed; absent = in progress or no walk } // engine behaviour (uses only capsule shapecasts and GJK closest point for portability): diff --git a/proto/decentraland/sdk/components/avatar_movement_info.proto b/proto/decentraland/sdk/components/avatar_movement_info.proto index 1e9f7f77..bb9e006a 100644 --- a/proto/decentraland/sdk/components/avatar_movement_info.proto +++ b/proto/decentraland/sdk/components/avatar_movement_info.proto @@ -17,4 +17,6 @@ message PBAvatarMovementInfo { decentraland.common.Vector3 external_velocity = 5; // the velocity imparted by movement of the "ground" platform or pushing from other moving colliders decentraland.sdk.components.PBAvatarLocomotionSettings active_avatar_locomotion_settings = 6; decentraland.sdk.components.PBInputModifier active_input_modifier = 7; + optional decentraland.common.Vector3 walk_target = 8; // if set, the movement scene should walk the player to this scene-relative position + optional float walk_threshold = 9; // stop distance for walk_target; considered reached when within this distance }