Comments (6)
from learn-webxr.
THX Nik! This helps a lot!
One last qusetion for your last words,
"The last step is to restore the players original quaternion. Then in the render loop we use the slerp method of the quaternion class to interpolate towards this pre-calculated quaternion.",
What's the purpose for " to interpolate towards this pre-calculated quaternion."?
from learn-webxr.
from learn-webxr.
THX Nik! This clear my doubt on interpolation.
Still some doubts stay.
- Do you mean lookAt is served for "If a character is climbing or descending we still want them to remain upright. "
If it is, I wrongly reckoned lookAt as a function for changing direction of knight from current to face target spot, which rotate around the y-axis.
And I test the code followed is work on keeping knight upright:
const pt = this.object.position.clone();
pt.z += 10;
this.object.lookAt(pt);
- What is the purpose for "The last step is to restore the players original quaternion. " instead of just keeping the changed quaternion in players as same as this.quaternion
this.quaternion = player.quaternion.clone();
player.quaternion.copy(quaternion);
from learn-webxr.
from learn-webxr.
THX Nik!That's quiet clear Now!
Sorry for the endless question, Hope you dont mind!
from learn-webxr.
Related Issues (3)
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 learn-webxr.