Attaching Camera to vehicle setup for VR first person perspective

Hi All

Have been trying to attach a camera to a car and then enable VR to allow you to view from inside the car when running in VR but the camera always stays static to the original position even though its attached to the car setup. So when the car moves that XR camera just stays in the original place.
Anyone know how this could be done?

Thanks

1 Like

@parance how are you attaching the camera, if you don’t mind elaborating a bit more?

So im creating a camera and then grouping it inside the vehiclewizard under the chassis. When i press play its fixed to the car fine. So thought id try running it in VR and selecting the “active camera” in the VR menu. but when it runs the camera just stays fixed in position whilst i can control the car, the camera stays put.
Thanks

to be fully transparent, i have not had the chamce to work with VR since i dont have the proper equipment, so the mods/devs may have better solutions for you. but if you happen to have the omni.physx.camera extension turned on, i believe you could add “Follow Look” property per the doc:

https://docs.omniverse.nvidia.com/extensions/latest/ext_vehicle-dynamics.html#vehicle-dynamics-introduction

not sure if it’s something you’ve already tried, though.

other thing to try is adding the camera under the chasis hierarchy rather than in a group. (maybe a screenshot of your stage would provide more context as to how things are set up)

Hi,
Apologies hadnt had a chance to test.

I tried those ideas thanks, but again its the same problem the VR camera defaults to the active camera position and doesnt update once its started.

Ive put a video here. https://drive.google.com/file/d/1CCNoDX3vKlQDwkYRN1mnwtSoYS5at9Oz/view?usp=sharing

You will see once VR is started the camera is locked, and you can see the look at camera moving around the scene.

Thanks

thanks for the link! but i don’t think the permission is set to allow for public view unfortunately.

Sorry try this one https://drive.google.com/file/d/1CCNoDX3vKlQDwkYRN1mnwtSoYS5at9Oz/view?usp=sharing

so to reiterate, i am just another user so my information may not be accurate but willing to try put our brains together until we can hear back from the mods/devs.

without using the ‘Follow Look’ option (honestly, i don’t think that’s what you are after in the first place? i presume you wanted to pretend as if you are viewing from the driver seat), have you looked at/messed around with the navigation settings? the settings i am curious about specifically are the ‘physical world USD anchor’ and ‘write camera position into USD’. i recall reading from somewhere this will change where you are spawned when you start the VR session, but i am curious if using a custom anchor would changes the behavior in anyway.

image

I’ve tried the custom USD anchor. But that again puts the starting point on the specified USD and doesn’t move with the object.

The write camera position in to USD didn’t give me the desired result. It has an additional setting that comes up Ouput path for camera. The description of this parameter kind of tells you that this will not work. /xrstage/profile/vr/enableCameraOutput ( Allow camera position to be exported to a USD prim ) . The opposite is what is needed. The USD Prim position has to be exported to the camera position. When I tried it, the specific object got connected to the VR camera position and moved as the VR headset moved.

I noticed that create XR has this additional feature. custom spawn point ( /xrstage/profile/vr/customAnchorPath ) I am trying to see if this will work.

Some direction from the NVIDIA team will be helpful. Thank you.

1 Like