Photon Fusion 1.1.13

Public Attributes | Properties | List of all members
Rotation Struct Reference

Wrapper class which unifies rotation handling of Quaternion, Euler or Z-only (used by 2D). Can store a Quaternion, Euler or Z-axis (for 2d rotation), and implicitly casts between those types. More...

Public Attributes

readonly RotationTypes Type
 Indicates of the stored rotation is a Quaternion or Euler type. More...
 

Properties

Vector3 AsEuler [get]
 Returns the rotation as a Euler. If original type was Quaternion, that is converted to a Euler. More...
 
float AsFloatZ [get]
 Returns the z-axis value of the rotation. If original type was Quaternion, first converts to a Euler then returns the z value of that Euler. More...
 
Quaternion AsQuaternion [get]
 Returns the rotation as a Quaternion. If original type was a Euler or Rotation Z-axis only, that is converted to a Quaternion. More...
 

Detailed Description

Wrapper class which unifies rotation handling of Quaternion, Euler or Z-only (used by 2D). Can store a Quaternion, Euler or Z-axis (for 2d rotation), and implicitly casts between those types.

Member Data Documentation

◆ Type

readonly RotationTypes Type

Indicates of the stored rotation is a Quaternion or Euler type.

Property Documentation

◆ AsEuler

Vector3 AsEuler
get

Returns the rotation as a Euler. If original type was Quaternion, that is converted to a Euler.

◆ AsFloatZ

float AsFloatZ
get

Returns the z-axis value of the rotation. If original type was Quaternion, first converts to a Euler then returns the z value of that Euler.

◆ AsQuaternion

Quaternion AsQuaternion
get

Returns the rotation as a Quaternion. If original type was a Euler or Rotation Z-axis only, that is converted to a Quaternion.