SRL Archive - Reflection Help

TileToMSEx: Offsets, Height


TomTuff

2011-01-04 23:34:25

So I have two questions about TileToMSEx:
1. in which direction do the x offsets and y offsets go? if i'm not mistaken, it works like this pic below:


2. How does "Height" work? Is it just pixels? How does this work at different camera angles/orientations?

kingarabian

2011-01-04 23:45:16

I would dearly like to know too…

Bad Boy JH

2011-01-05 01:47:10

think of offsets as like making it Tile(3052.3, 1096.7), so as you face north, the botton left is offsets of 0, 0.

Height, I am unsure of the unit, but it keeps the same in game height regardless of camera height or orientation. Each item has its own height, and it always has that height at all camera positions

mormonman

2011-01-05 01:53:10

Height is pixels.

Bad Boy JH

2011-01-05 06:12:58

are you sure? it changes when orientation changes…

I have tested this…

mormonman

2011-01-05 13:06:58

Have you ever analyzed our TileToMSEx? It's pixels.

lordsaturn

2011-01-05 13:15:33

your y-axis arrow is facing the wrong direction…:duh:

Height is height above the tile, measured in unit RSHeight. RSHeight is an imaginary unit that I just made up. It is not measured in pixels.

mormonman

2011-01-05 13:24:52

From: lordsaturn
your y-axis arrow is facing the wrong direction…:duh:

Height is height above the tile, measured in unit RSHeight. RSHeight is an imaginary unit that I just made up. It is not measured in pixels.


It is pixels above the average tile height.

lordsaturn

2011-01-05 13:28:15

From: mormonman
It is pixels above the average tile height.


perhaps on the 3d plane, i am positive not on the 2d plane.

Gu3st...

2011-01-05 13:30:59

From: lordsaturn
perhaps on the 3d plane, i am positive not on the 2d plane.
One tile is 512 pixels wide (afaik), so it's measured in pixels but it's on the 3d plane, yeah

mormonman

2011-01-05 13:33:52

From: lordsaturn
perhaps on the 3d plane, i am positive not on the 2d plane.


Actually I lied, its pixels below the average tile height. Yes, I am talking 3D because that is how rs does points on the screen now.


pixelY:= GetTileHeight(tile) - height;

footballjds

2011-04-06 10:10:14

BUMP
I'd really like this clearly explained… I tried learning about offsets by looking at the Reflection Random solvers(Mr. Mordaut) when they're used to click doors… but i'm still not feeling 100% sure how to use them.
Anyone mind telling more definitively everything there is to know when using TileToMSEx?
also, camera XY plays an affect, no?

TomTuff

2011-04-06 10:19:43

From: iTry
BUMP
I'd really like this clearly explained… I tried learning about offsets by looking at the Reflection Random solvers(Mr. Mordaut) when they're used to click doors… but i'm still not feeling 100% sure how to use them.
Anyone mind telling more definitively everything there is to know when using TileToMSEx?
also, camera XY plays an affect, no?


It does but I beleive it's handled in the calculation. The x offset is how far across the tile to go on the y axis as a percent expressed by decimal. The y offset is the same thing but for the y axis. Height is how many pixels high off the tile you want the point to be (I think it's a bit less archaic than that but that pretty much sums it up).

E: And for reference, TileToMS() uses TileToMSEx(…, 0.5, 0.5), or in other words the center of the tile.

Home

2011-04-06 10:20:01

Converts the global tile position, a position on that tile in the
range [(0,0), (1,1)] with (0.5, 0.5) being center and a height above
ground level to a screen location on the main screen, taking camera
position and rotation into account.


Those 0, 0 and 1, 1 are just Offsets.

From TileCore.Simba

That should explain it pretty well :)

~Home