I created a basic LAN multiplayer game that works fine with a FP character. Everything works on the host, then the client player spawns at a player start and everything works great. When I try to duplicate this level and recreate everything for VR, the spawned player does not work correctly. When the client joins, it seems to work momentarily, but once it tries to move, it immediately jumps to 0,0,0 and is stuck there with no control. The main thing I did on this level to try and make it work was create a custom game mode with a MotionControllerPawn as the default pawn class, but I don’t fully understand how all that works, therefore, I am not sure that is the right thing to do.
The goal is a VR project for arch viz with multiple people collaborating in VR together.
Any help on the proper setup for spawning client VR pawns in the level would be much appreciated.
Sometimes this can happen if the player is not in the center of their play area and the player gets spawned, but there is something colliding with their capsule resulting in them either not spawning or being spawned somewhere that isn’t desirable, depending on the ESpawnActorCollisionHandlingMethod setting.
I get that part, and I think I am okay on that front (I will double check and test again). The odd thing is that it seems to spawn in the correct place at first, until you move. Also, the same spawn point works with a FP character. It seems to be something unique about the motion controller pawn.
Indeed, that is not the problem. When the second player starts the player spawns in the right place, except a little bit too high. As soon as they try to teleport anywhere, they simply jump to 0,0,0 and can no longer move.
If there is something to move on at 0,0,0 and it isn’t a case of them simply being stuck, then it could be you have switched to a different player controller class, like spectator maybe. I find it helpful to have a menu I can popup and see what player controller classes are instanced and also what character classes are instanced. It has helped me troubleshoot many problems. If your game runs in PIE then you could check the WorldOutliner while the game is running and see what is going on, it might help.
With further fidgeting, I have found out some things. The motion controllers are working on player two. The HMD works and all controls work. Even the teleport ray is showing properly, but cylinder I am supposed to be teleporting to always remains at 0,0,0. So, at the end of the ray there is simply a sphere, and the normal teleport circle / arrow remain at 0, therefore, I always teleport to 0 no matter where I point my motion controller. I’m baffled by this, but I assume it is something with the BP_motioncontroller.
I could be wrong, but it sounds like your navmesh could be messed up. Try viewing the level in editor with navmesh visualization on and make sure that it covers the area you are trying to teleport around in. If your teleporting functionality is not using the navmesh then ignore this.
I thought the same, but I already verified that navmesh is working. I’ve dealt with lots of Navmesh issues, but this one is a little different. I can point anywhere on the map, but the TeleportCylinder (BP_motioncontroller) simply will not go the new point. It rotates, but does not move, so I can relocate at a different rotation but never a different location, no matter where I point (only for player 2). Thanks for your answers. I am surprised there aren’t more questions about this.