Tissemand
Squire
I seem to be having a small issue when trying to render large/long objects.
Whenever I display an item, I use UltimaSDK to get the image of an item.
When I position it, I find the difference relative to the client's body:
As a result, I incorrectly get something like this:
instead of:
(the tiles are animated, so the itemids are slightly different)
Anyway, I'm wondering if there's a certain value that affects where an object is placed, or if there's just something I'm missing.
Whenever I display an item, I use UltimaSDK to get the image of an item.
When I position it, I find the difference relative to the client's body:
Code:
// find deltas between self and object
var dX = (object.x - self.x);
var dY = (object.y - self.y);
console.log('{0}: ({1}, {2})'.format(serial, dX, dY));
var x = dX * 22 - dY * 22;
var y = dY * 22 + dX * 22;
y -= (object.z || 0);
As a result, I incorrectly get something like this:
instead of:
(the tiles are animated, so the itemids are slightly different)
Anyway, I'm wondering if there's a certain value that affects where an object is placed, or if there's just something I'm missing.