Quote: "How could I send an impulse in the direction that the ray cast was going?"
You already have the start and end point of your ray. To turn that into a pair of "unit vectors" you need to get the distance between the two points and divide the difference in X and Y by that value and then use the unit vextors (between -1.0 and 1.0) to multiply by your impulse strength...
In code:
dx# = x2#-x1#
dy# = y2#-y1#
d# = sqrt(dx#*dx# + dy#*dy#)
uvx# = dx# / d#
uvy# = dy# / d#
setSpritePhysicsImpulse(spriteID,getSpriteXbyOffset(spriteID),getSpriteYbyOffset(spriteID),uvx#*speed#,uvy#*speed#)
...written from my head so you might want to test it.