I have had this problem with both 4.11.1 and 4.11.
I am trying to use the couch knights demo, and it works fine for the first player, but not player 2. The camera orientation relative to the character head is always facing in the same direction. I realised after several hours of playing with blueprints transforms that they are overridden by the new “Lock to HMD” setting on the camera (https://docs.unrealengine.com/latest/INT/Platforms/VR/VRCameraRefactor/index.html ). This setting is useful in concept, but it seems that to make it work, the demo has a base with 180 degree rotation and the camera has 180 degree rotation, which should cancel out. If you remove them, it faces in the opposite direction. If you disable this option, and keep the original camera transform blueprints, then the orientation and position seems fine, but the “world to meters” scale becomes equivalent to 1 instead of 100 and is unaffected by the world settings option.
So I am stuck either way, “Lock to HMD” on gives me the right world scale, but the wrong orientation relative to the parent objects, and “Lock to HMD” off gives me the expected orientation relative to parent objects, but the world scale is completely wrong.
People have been using this for a week, am I doing something wrong, or are these 2 really annoying bugs that have been bodged around in the Couch knights sample?
I have a few questions for you that will help narrow down what issue it is that you are experiencing.
- Can you reproduce this issue in clean project?
- If so, could you provide a detailed list of steps in order to reproduce this issue on our end?
- Could you provide screen shots of any blueprints that may be involved with this issue?
- Could you tell us which VR device it is that you are using?
I haven’t tried reproducing it in an clean project, but like I said - I am using the couch knights demo, which is an Unreal Sample Project. All you have to do is open it up and either play as the second player or move the primary player avatar to the opposite couch (rotate 180). No blueprint changes are required to reproduce the issue.
All I changed was removing the logic to position the on-screen text as that now works automatically by parenting the text to the camera. This had no bearing on the issue.
I had the impression that this sample project was supposed to have been updated to work with the latest VR updates (the camera refactor). FWIW, I am using an Oculus DK2 and I had the same issue before and after the Oculus 1.3.0 sdk update.
I was able to reproduce this issue on our end using couch nights. However, after doing a bit of testing I was able to find that this issue does not occur in a clean 4.11.1 project. The world to meters appears to be function as expected with or without lock to HMD on. This means that you will need to modify the camera settings in couch knights in order to achieve the result that you are going for. After unchecking “Lock to HMD” as suggested in the documentation, couch knights appears to function correctly. I hope that this information helps.
Make it a great day
It’s great you got it working in a clean project, but who’s going to fix couch knights? It’s supposed to be an educational sample, so surely it should work? And if it doesn’t work by disabling lock to hmd, what else has to be changed? People are using the old mechanism like in couch knights in their projects, so they need to know how to make it work with 4.11.1.
I have provided a quick example below that should be able to get you started in the right direction. I was able to get the camera to work as expected with the setup given. I hope that this information helps.
Here I have given the camera a scene component as a parent and I have set the starting location and rotation of that scene component. I have left “Lock to HMD” enabled in this example. This was simply added to the end of a line of blueprints that are in the character by default that execute on begin play.
I just tried this and it didn’t work. It still faces backwards when I rotate the player 180 degrees. Is adding what you have shown in the picture all that you changed?
The example above was meant as an example to get you started in the right direction, not as an exhaustive solution. However, I have provided another method below that appears to be a good workaround for most cases. I hope this helps.
All I have done in this example is add a scene component and subtract the actor’s rotation from that of the scene component’s rotation. I have also set the scene component’s location to that of Arrow 2.
This is my list of components for the Oculus Character Actor
Make it a great day
Thanks, that has fixed it. Are we basically countering the fact the camera ignores actor rotation using the Scene Base? It really seems like this should be automatic or toggled with another checkbox on the camera. Maybe something like “Use World Orientation” to turn this functionality off.