0

Am new to react vr world , i learned basics of react vr from some of the sites .And i tired some sample projects too . I followed this tutorial

Although i searched from many sites i dont know how to move a avatar inside pano or any other vr components . Can any one tell/help/guide to move avatar inside React vr pano . or suggest me some tutorial which explains moving of avatar inside pano .

Beckham_Vinoth
  • 701
  • 2
  • 13
  • 39

2 Answers2

0

As I understand you want just add child components so for example to nest Model inside Pano:

<Pano>
 <Model></Model>
</Pano>

like in HTML. You can read here about JSX in ReactVR.

Alan Wołejko
  • 442
  • 2
  • 5
  • 20
  • i did that already bro , the thing is i dont know how to move that Model , For example lets say i have car model i want to drive the car inside that pano . . is it possible ? Do you have any refernce link for that ? if so please suggest me .. . thanks for your valuable time :) – Beckham_Vinoth Apr 25 '18 at 10:02
  • Oh so I think something like this is not possible in React VR, at least not straightforward. As far as I know, 'Your' position is always centered. However, I was experimenting with stuff like that and I made something similar by moving everything around me, for example after clicking 'W' all objects positions changed + 0.1 but it was quite simple, you couldn't turn around etc. Also, I'm not sure how efficient it will be with more objects, it's framework for 3D/VR websites not 3D games engine ;) – Alan Wołejko Apr 25 '18 at 11:03
0
<Model 
  style={{
          transform: [{translate: [this.state.x,this.state.y,this.state.x]}]
        }}

source source={{ obj: asset("earth.obj"), mtl: asset("earth.mtl") }}
lit={true}
/>

//increase the value of the x,y,z it will look like it is running //or use the setTimeout function to update the value of x,y,z