|
@@ -1339,6 +1339,32 @@ export class MoveService implements OnModuleInit {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ stopJoystick(userId){
|
|
|
|
+ this.reply.traceIds = [];
|
|
|
|
+ const user = this.users[userId];
|
|
|
|
+ this.reply['newUserStates'][0].userId = userId;
|
|
|
|
+ this.reply['actionResponses'][0].traceId = null;
|
|
|
|
+ this.reply['newUserStates'][0].playerState.player.angle.yaw = user.player.angle.yaw;
|
|
|
|
+
|
|
|
|
+ this.reply['newUserStates'][0].playerState.player.position = JSON.parse(
|
|
|
|
+ JSON.stringify(user.player.position),
|
|
|
|
+ );
|
|
|
|
+ this.reply['newUserStates'][0].playerState.camera.angle = JSON.parse(
|
|
|
|
+ JSON.stringify(user.camera.angle),
|
|
|
|
+ );
|
|
|
|
+ this.reply['newUserStates'][0].playerState.camera.position = JSON.parse(
|
|
|
|
+ JSON.stringify(user.camera.position),
|
|
|
|
+ );
|
|
|
|
+
|
|
|
|
+ this.reply['newUserStates'][0].playerState.cameraCenter = JSON.parse(
|
|
|
|
+ JSON.stringify(user.player.position),
|
|
|
|
+ );
|
|
|
|
+ this.reply['newUserStates'][0].renderInfo.isMoving = 0;
|
|
|
|
+ this.reply['actionResponses'][0].traceId = null;
|
|
|
|
+ this.reply.mediaSrc = null;
|
|
|
|
+ return this.reply;
|
|
|
|
+ }
|
|
|
|
+
|
|
async modeifyCameraAngle(angle, userId, traceId, actionType) {
|
|
async modeifyCameraAngle(angle, userId, traceId, actionType) {
|
|
const checkReplys = [];
|
|
const checkReplys = [];
|
|
if (angle > 22) {
|
|
if (angle > 22) {
|