Quote: "Right now i have it working with GetWorldX/YFromSprite() ... I need the point that is distance from point1 on the line"
not sure what i'm missing because i think you're already doing similar:
// Project: PointOnLine
// Created: 2020-10-31
// show all errors
SetErrorMode(2)
// set window properties
SetWindowTitle( "PointOnLine" )
SetWindowSize( 1080, 720, 0 )
SetWindowAllowResize( 1 ) // allow the user to resize the window
// set display properties
SetVirtualResolution( 1080, 720 ) // doesn't have to match the window
SetOrientationAllowed( 1, 1, 1, 1 ) // allow both portrait and landscape on mobile devices
SetSyncRate( 30, 0 ) // 30fps instead of 60 to save battery
SetScissor( 0,0,0,0 ) // use the maximum available screen space, no black borders
UseNewDefaultFonts( 1 ) // since version 2.0.22 we can use nicer default fonts
red = MakeColor(255,0,0)
cx# = 540.0 : cy# = 360.0 `center screen
distance# = 100.0
spr1 = createsprite(0) : SetSpritePositionByOffset(spr1,cx#,cy#)
spr2 = CreateSprite(0)
spr3 = CreateSprite(0) : SetSpriteColor(spr3,0,255,0,255)
do
MX# = GetPointerX() : MY# = GetPointerY()
SetSpritePositionByOffset(spr2, MX#, MY#)
DrawLine(cx#,cy#,mx#,my#,red,red)
ThisAngle# = ATanFull(mx#-cx#,my#-cy#)
SetSpritePositionByOffset(spr3,cx#+SIN(ThisAngle#)*Distance#, cy#-COS(ThisAngle#)*Distance#)
Print( ThisAngle# )
Sync()
loop
??