Giter VIP home page Giter VIP logo

Comments (3)

fenomas avatar fenomas commented on August 16, 2024 1

Hey, thanks for looking at the library!

Third person camera can mean a couple of things, but did you see noa.rendering.zoomDistance? In all my demos scrolling the mousewheel zooms the camera back by changing that property.

The way it currently works is, there's an empty mesh called noa.rendering._cameraHolder that stays pinned to the player's view location and rotates as the player moves their view. Then the actual camera is a child of that mesh, and when you change the zoomDistance the camera moves back and forth in the camera holder mesh's local coordinates, so in world coords it winds up projected to a point behind the player.

But it's meant to be an optional default implementation - a game with particular needs can in principle make a new camera and have it move however, and tell Babylon to render with that one instead of the default one. I haven't done this personally, so there might be wrinkles though.

Let me know if that's what you're looking for..

from noa.

queer avatar queer commented on August 16, 2024 1

Oh my goodness, I can't believe I didn't figure this out. Yes, this is exactly what I was wanting! Thank you so much! ❤️

from noa.

fenomas avatar fenomas commented on August 16, 2024 1

Ah good... the property could probably be better named. BTW there's also a camera zoom speed property, for how fast the camera tweens to the desired zoom level. But the default behavior is that the library also raycasts backwards from the player's head each frame looking for obstructions, and limits the zoom level if it encounters solid voxels.

Hope that helps, thanks for trying things out!

from noa.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.