vulkano-examples | Examples of using vulkano | REST library
kandi X-RAY | vulkano-examples Summary
kandi X-RAY | vulkano-examples Summary
Examples of using vulkano
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of vulkano-examples
vulkano-examples Key Features
vulkano-examples Examples and Code Snippets
Community Discussions
Trending Discussions on vulkano-examples
QUESTION
I have adapted a Vulkano, GLTF viewer example, to allow for keyboard and mouse input, to apply translation and rotation to the scene. The translation works fine, but the rotation causes the objects in the scene to move right up to the camera and stretch out until they look like garbage, as the rotation approaches between 90 - 180 degrees.
This is what the scene looks like before rotation:
And this is when rotation is at approx 90 degrees:
I'm using cgmath Quaternions for the rotation. I haven't used quaternions before, so I'm wondering if anyone could tell me if I'm using them correctly, I suspect this is where the problem lies.
This is how I'm creating the initial quaternion, using an equation I found here:
...ANSWER
Answered 2018-Mar-17 at 22:22The reason for the stretching was because I was combining the initial and subsequent quaternions incorrectly. You can't just add them together, but the * operator works to concatenate rotations.
So I changed the mouse input portion of the code to this and it works:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install vulkano-examples
Rust is installed and managed by the rustup tool. Rust has a 6-week rapid release process and supports a great number of platforms, so there are many builds of Rust available at any time. Please refer rust-lang.org for more information.
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page