Comments (3)
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.
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.
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)
- Is there any way to use this as an es6 module? HOT 10
- Support gamepad input
- Outdated comment + note on blockMesh registration HOT 2
- Alpha blended mesh ordering issue HOT 2
- Terrain remeshing bug when block is neither solid nor opaque HOT 3
- Custom voxel occasionally leaves one side after removal. HOT 4
- UV offsets wrapping at edges of blocks HOT 2
- object meshing bug HOT 6
- Meshing with non-opaque blocks is incredibly slow + block textures with alpha dont work HOT 4
- custom renderMaterial performance (for animated textures) HOT 2
- Supporting noa HOT 2
- Does NOA support child meshes? HOT 3
- webgpu? HOT 2
- How to define new objects in NOA engine. HOT 5
- Optimal octreeBlockSize
- What is the best way to manually build worlds? HOT 2
- render all blocks even if covered HOT 1
- How to import an obj model?
- refresh the registry on the go HOT 2
- Making a set world.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from noa.