Hi all. I am new to Impact and this is my first forum post. I'm having a lot of fun learning how everything works, but this has got me stumped:

With the help of this thread I managed to get a shadow to appear under my player entity. It stays on the ground under the player via this code at the end of the player entity's update function:
var tr = ig.game.collisionMap.trace(this.pos.x, this.pos.y, 0, ig.system.height, 0, 0);
this.shadow.pos.x = tr.pos.x;
this.shadow.pos.y = tr.pos.y;

Here is an example of the coordinates of the player and coordinates returned by the trace when the player is over flat ground:
this.pos: { x=13.935400000000026, y=56}
tr.pos: { x=13.935400000000026, y=72}
The tr.pos coordinates tell me where the ground is directly underneath the player, which is where the shadow should be.

But here is an example of coordinates of the player and the trace when standing on a slope:
this.pos: { x=40.91031850549444, y=50.36322716483519}
tr.pos: { x=-3.8896814945055525, y=83.96322716483519}

I'm assuming this is is a feature, not a bug, and I just need to understand how it works. Is there some math I need to do with the numbers in tr.collision.slope that will get me to the location where the trace actually intersected the slope, ie. the location where my shadow needs to be?

Thanks!