I'm at work now so I tried to make little collision test with trial AppGameKit (might behave differently than norman AGK).. it is different than code I use but I hope it shows something. Use mouse to "guide" one sprite collide other in different angles/sides. Small rectangle shows collision point and very small one is just for mousejoint.
SetVirtualResolution ( 320, 480 )
LoadImage ( 1, "small_blue.png" )
CreateSprite ( 2, 1 )
CreateSprite ( 3, 1 )
CreateSprite ( 6, 1 )
CreateSprite ( 7, 1 )
SetSpritePosition ( 2, 100, 0 )
SetSpriteAngle(2,40)
SetSpritePosition ( 3, 140, 200 )
SetSpriteAngle(3,-10)
SetSpritePosition ( 6, -20, -20 )
SetSpriteScale(6,0.2, 0.2)
SetSpriteScale(7,0.1, 0.1)
SetSpritePhysicsOn ( 2, 2 )
SetSpritePhysicsOn ( 3, 1 )
SetSpriteShape( 2, 3 )
SetSpritePhysicsCanRotate( 2, 0 )
CreateMouseJoint( 1, 2, 100+GetSpriteWidth( 2 )/2 , 0+GetSpriteHeight(2)/2 , 40000 )
SetPhysicsDebugOn()
do
if GetPointerState()=1
SetJointMouseTarget( 1, GetPointerX() , GetPointerY() )
SetSpritePosition ( 7, GetPointerX()-3, GetPointerY()-3 )
endif
if GetSpriteFirstContact(2)=1
spr2 = GetSpriteContactSpriteID2()
tx# = GetSpriteContactWorldX( )-6
ty# = GetSpriteContactWorldY( )-6
SetSpritePosition ( 6, tx#, ty# )
print("collision with sprite:" + str(spr2))
else
SetSpritePosition ( 6, -20, -20 )
endif
// if GetFirstContact()=1
// spr1 = GetContactSpriteID1()
// tx# = GetContactWorldX( )
// ty# = GetContactWorldY( )
// SetSpritePosition ( 6, tx#, ty# )
// print("collision with sprite:" + str(spr1))
// else
// SetSpritePosition ( 6, -20, -20 )
// endif
Sync ( )
loop
edit: typo fixed "GetSpriteContactWorldX()" -> Y