Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Accessing HMD matrix & setting clipping planes #4

Open
wants to merge 7 commits into
base: develop
Choose a base branch
from

Conversation

mantissa
Copy link

Adding the ability to get and set the HMD matrix (for advanced camera work) and added setters for near and far clipping planes.

@smallfly
Copy link
Owner

Hi Jeremy,

Do you have an example of 'advanced camera work' using the new methods to get and set the HDM matrix?

Also, even using the method setCurrentHMDMatrix, the HDM's matrix will be updated each frame in the updateDevicesMatrixPose method and therefore lose any matrix set using the new method. Am I wrong?

A detail, but it would be great if you could do PR against the develop branch. I found it makes things easier for testing.

Thanks,

@mantissa
Copy link
Author

mantissa commented Aug 16, 2016

Hey Hugues,
Indeed, I will post an example on my repo and PR against your develop branch, no problem. But you bring up a good point: the HMD matrix is updated every frame in update. You'll see in my camera on a path example that I'm actually replacing the matrix after update.
Talk soon!

@mantissa mantissa changed the base branch from master to develop August 16, 2016 16:32
@mantissa
Copy link
Author

okay, just added an example to my own fork. i'm currently on a machine that doesn't have a VS license, but this should compile. the ability to set the VR camera position was a (much loved) function of DKII addon. happy to discuss how this functionality might be better integrated into ofxOpenVR.

@smallfly
Copy link
Owner

Great! I'm currently in a train on my MBp (so no VS too ;). I will look at all this later today or tomorrow. And yes, we will look into finding the best way to add this to the addon.

smallfly added a commit that referenced this pull request Oct 16, 2016
…ill (eg. properly apply the transformation on the Vive controllers matrices) - see PR #4 for more info #4
@smallfly
Copy link
Owner

Hey Jeremy,

I'm finally coming back to this. I have done some changes to the master branch today (in order to use glm) and then I made a new branch to implement this - https://github.com/smallfly/ofxOpenVR/tree/feature-hdm_translation . I was going to use your PR, but I did not as I decided to move things around quite a bit.

Anyway... This is a WIP. There are few issues still, for example with the Vive:

  • The controllers' matrices need to be updated too in order to follow the HDM. I did not get the chance to make it work properly yet.
  • When running the example, it sometime seems that moving in the space (room scale tracking) has an impact on the 'rendering'.

I will continue to work on this,

Cheers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants