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

PerspectiveCamera :lookAt seems not to work #111

Open
BlackScorp opened this issue Feb 19, 2023 · 3 comments
Open

PerspectiveCamera :lookAt seems not to work #111

BlackScorp opened this issue Feb 19, 2023 · 3 comments

Comments

@BlackScorp
Copy link

Hello there

i have following code

  <div id="map">
    <Renderer :antialias="true">
      <PerspectiveCamera :position="[0, 4, 4]" :lookAt="[0,0,0]">
      </PerspectiveCamera>
      <Scene background="#eeeeee">
        <AmbientLight :position="[0, 100, 0]" :intensity="1"/>
        <AxesHelper :size="3"/>
        <GridHelper :size="50" :divisions="50"/>
        <Mesh name="locationHelper">
          <MeshBasicMaterial color="red"/>
          <BoxGeometry :width="0.5" :depth="0.5" :height="0"/>
        </Mesh>
        <GLTFLoader
            v-for="tile in allTiles"
            ref="models"
            :url="tile.path"
            :scale="[.5,.5,.5]"
        >
          <InstancedMesh
              ref="instancedMeshes"
              :count="60*90"
          ></InstancedMesh>
        </GLTFLoader>
      </Scene>
    </Renderer>
  </div>

here i assume the camera will look down to 0,0,0 but the camera still looks straight. iam using the version "1.0.0-alpha-1.44",

maybe this is the problem?

https://github.com/janvorisek/drie/blob/master/src/Cameras/PerspectiveCamera.vue#L127

@janvorisek
Copy link
Owner

You're right. The prop handling needs some refactoring in both cameras. I'll fix the issue tomorrow.

@janvorisek
Copy link
Owner

Fixed in 1.0.0-alpha-1.45. Can you confirm and close if resolved?

@BlackScorp
Copy link
Author

hi @janvorisek i updated to alpha-1.48 and sadly code still produce the same output.

also can you make fov as prop? currently i have to change it via ref, because 75 is too high for me.

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