User Tools

Site Tools


guides:tips-on-quaternion

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
guides:tips-on-quaternion [2020/04/22 19:10] – created vjraymonguides:tips-on-quaternion [2021/02/23 11:57] (current) – title fix minotorious
Line 1: Line 1:
-====== Custom component : tips about quaternion ======+====== Tips on Quaternions ====== 
 + 
 +Since 1.5, Foundation allows to mod Custom component and links it to a fbx (see Exemple02) 
  
 Assuming the local axis Y of the building is vertical (most cases), Assuming the local axis Y of the building is vertical (most cases),
-a way to compute the cosinus (named "cosp") and sinus (named "sinp") of the rotation angle of the building around the vertical is the following:+a way to compute the cosinus (named ''cosp'') and sinus (named ''sinp'') of the rotation angle of the building around the vertical is the following:
  
 <code lua> <code lua>
Line 10: Line 12:
 </code> </code>
  
-Note: You can check that cosp*cosp + sinp*sinp is near 1+Note:  
 + 
 +1) You can check that ''cosp''*''cosp'' ''sinp''*''sinp'' is near 1 
 + 
 +2) This can be used, for instance, to convert a local direction on XZ plane (local coordonates for "translate"), to a global direction (global coordonates for "rayCast").
guides/tips-on-quaternion.1587597008.txt.gz · Last modified: 2020/04/22 19:10 by vjraymon

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki