Page 1 of 1

Centering enemy NPC record frames

Posted: Sat Mar 02, 2019 6:56 am
by spearman
Can anyone give a hint on how to take record size, scale, offsets and use them to position the frames within a square of a predefined size? I've tried a few different permutations and I get some results that are close, but some records are still too high or low and not quite centered. Here's an example using a 186px square (using the scale value of -70: 256 - 70 = 186) and shifting the frames by offset.x/2 and offset.y/2:


Note this is not a Unity project so I'm just using the DaggerfallConnect API here.