Allow getting yaw of player through tablet component

This commit is contained in:
ChristoCoder 2017-10-26 16:17:26 -04:00 committed by payonel
parent 73c642dee8
commit c930ec329e

View File

@ -37,4 +37,7 @@ class Tablet(val tablet: TabletWrapper) extends prefab.ManagedEnvironment with D
@Callback(doc = """function():number -- Gets the pitch of the player holding the tablet.""")
def getPitch(context: Context, args: Arguments): Array[AnyRef] = result(tablet.player.rotationPitch)
@Callback(doc = """function():number -- Gets the yaw of the player holding the tablet.""")
def getYaw(context: Context, args: Arguments): Array[AnyRef] = result(tablet.player.rotationYaw)
}