I am observing a rotation value of a character in a game, and its value confuses me.
I am wondering, what kind of unit is used here? It does not seem to be radian or degrees.
When the character faces...
north, rotation = 0.014887573 north-east, rotation = -0.28192267 east, rotation = -0.7139419 south-east, rotation = -0.9176189 south, rotation = -0.99983466 west, rotation = 0.6936041 sou开发者_C百科th-west, rotation = 0.90622354 north-west, rotation = 0.36119097There appears to be somekind of exponential increase when facing a more southern rotation. Does this scale make sense to anyone?
Update: there appears to be another variable which somehow seems to resolve the actual rotation when multiplied with the above value when facing east or north. If mulitplied, when facing west the value will be 0.5 and when facing east it will be -0.5.
However, this multiplier becomes 0 when facing south and 1 when facing north, so when you multiple that with the first value they both become 0.
What kind of rotation representation uses multiple values in a 3D scene?
When calculating the arc sine of the above values it seems to make more sense.
North will become 0 South will become 90
West will become 45 East will become -45
I question though, why is the scale from 0 to 90 (north to south) and not from 0 to 180?
精彩评论