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

Viro3DObject always moves with the phone, not fixed to one position #993

Open
stoneWeb opened this issue Jul 2, 2023 · 1 comment
Open

Comments

@stoneWeb
Copy link

stoneWeb commented Jul 2, 2023

Used internally by ViroARScene, it always moves with the phone position.
But ViroBox work is very well.

Who can help me!!!!

@HassanAfnan
Copy link

{}} > {/* Spotlight to cast light on the object and a shadow on the surface, see the Viro documentation for more info on lights & shadows */}
    <Viro3DObject
      source={require("./assets/chair/chair.obj")}
      position={[0.5, 0.2, 0]}
      scale={currentScale}
      type="OBJ"
      lightReceivingBitMask={3}
      shadowCastingBitMask={2}
      transformBehaviors={["billboardY"]}
      onDrag={moveObject}
      onPinch={onPinch}
    />
    <ViroQuad
      rotation={[-90, 0, 0]}
      width={0.5}
      height={0.5}
      arShadowReceiver={true}
      lightReceivingBitMask={4}
    />
  </ViroNode>
</ViroARScene>

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

No branches or pull requests

2 participants