how do use beebegames class, getAngleTo?

Hi,

I have my code as below,

Local shipRotation = newObject( { “circlegreen.png” }, 48, 64, 150, 150, nil, nil, 1, gamescreen )
function shipRotation:getAngleTo ( centreX, centreY )

end

The image displays etc, but I don’t know what to put in the function to save the angle to? Can anyone help?

Thanks! [import]uid: 8699 topic_id: 5154 reply_id: 305154[/import]

I have managed to work it out by using the below code.

local angleTo = mCeil(mAtan2( (centreY - ship.y), (centreX - ship.x) ) * 180 / mPi) + 90 [import]uid: 8699 topic_id: 5154 reply_id: 17169[/import]