I'm moving them with the command SetSpritePhysicsVelocity
But. There is no key input in the gif.
The sprites are resting and clipping each other.
this is an example of the code I made now to show what is happening
SetErrorMode(2)
SetWindowTitle( "Collisions" )
SetWindowSize( 1280, 720, 0 )
SetWindowAllowResize( 1 )
SetVirtualResolution( 1280, 720 )
SetSyncRate( 60, 0 )
SetScissor( 0,0,0,0 )
UseNewDefaultFonts( 1 )
setPhysicsGravity(0, 1000)
SetPhysicsDebugOn()
//Sprites
CreateSprite(1, 0)
SetSpriteSize(1, 100, 250)
SetSpritePhysicsOn(1, 2)
SetSpritePhysicsCanRotate(1, 0)
CreateSprite(2, 0)
SetSpriteSize(2, 100, 40)
SetSpritePhysicsOn(2, 2)
SetSpritePhysicsCanRotate(2, 0)
SetSpritePosition(2, 600, 500)
SetSpritePhysicsFriction(2, 1)
SetSpriteColor(2, 150, 50, 250, 255)
vx as integer
vy as integer
active = 0
do
if (GetRawKeyState(68))
vx = 150
vy = GetSpritePhysicsVelocityY(1)
active = 1
endif
if (GetRawKeyState(65))
vx = -150
vy = GetSpritePhysicsVelocityY(1)
active = 1
endif
if (GetRawKeyPressed(87))
vy = -400
vx = GetSpritePhysicsVelocityX(1)
active = 1
endif
if active = 1
SetSpritePhysicsVelocity(1, vx, vy)
active = 0
endif
Print( ScreenFPS() )
Sync()
loop