Search icon
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Papervision3D Essentials

You're reading from  Papervision3D Essentials

Product type Book
Published in Sep 2009
Publisher Packt
ISBN-13 9781847195722
Pages 428 pages
Edition 1st Edition
Languages

Table of Contents (18) Chapters

Papervision3D Essentials
Credits
About the Authors
About the Reviewers
1. Preface
1. Setting Up 2. Building Your First Application 3. Primitives 4. Materials 5. Cameras 6. Moving Things Around 7. Shading 8. External Models 9. Z-Sorting 10. Particles 11. Filters and Effects 12. 3D Vector Drawing and Text 13. Optimizing Performance

Rotating objects


In previous chapters, several methods and properties have been introduced to move and rotate objects. We have used the x, y, and z properties to set the position of objects and we have discussed the moveForward(), moveBackward(), moveLeft(), moveRight(), moveUp(), and moveDown() methods, which move an object in relation to its own axes. We also discussed the lookAt() method to make an object look at another object.

In many examples, we have set the localRotationX, localRotationY, and localRotationZ properties to rotate objects around their own x, y, and z-axis. However, when it comes to rotating objects, Papervision3D has more to offer.

Alternatives for local rotation—pitch(), yaw(), and roll()

The local rotation properties have their counterparts in the next three methods:

  • pitch(): Rotates the object around its own x-axis (localRotationX)

  • yaw(): Rotates the object around its own y-axis (localRotationY)

  • roll(): Rotates the object around its own z-axis (localRotationZ...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime}