Difference between revisions of "Talk:GetPositionX - ObjectReference"
Jump to navigation
Jump to search
m
Talk:GetPositionX - ObjectReference (edit)
Revision as of 10:57, 6 October 2017
, 10:57, 6 October 2017→Getting Cell Coordinates
imported>Lisselli (On converting/using cell coordinates.) |
imported>Lisselli |
||
Line 1: | Line 1: | ||
== Getting Cell Coordinates == | |||
== Getting Cell Coordinates == | == Getting Cell Coordinates == | ||
Ever wondered how you can use the [[Cell View]] window's coordinates in game? Simple. You take the two values and you multiply them by 4096. | Ever wondered how you can use the [[Cell View]] window's coordinates in game? Simple. You take the two values and you multiply them by 4096. | ||
If you want to convert an object's in game coordinates to use in the Cell View window, you divide the X and Y values by 4096 and cast as int to remove the decimals. | If you want to convert an object's in game coordinates to use in the Cell View window, you divide the X and Y values by 4096 and cast as int to remove the decimals. | ||
[[User:Lisselli|Lisselli]] ([[User talk:Lisselli|talk]])-- | [[User:Lisselli|Lisselli]] ([[User talk:Lisselli|talk]])[[User:Lisselli|Lisselli]] ([[User talk:Lisselli|talk]]) 2017-10-06T11:57:52 (EDT) | ||
: As with [[Floor - Math]], casting a negative value as int has its issues. This will result in inaccurate coordinates if they are negative values, especially the y position. Testing for a way around this. [[User:Lisselli|Lisselli]] ([[User talk:Lisselli|talk]]) 2017-10-06T11:57:52 (EDT) |