What's the Actionscript for Slope Detection in Flash? I've looked everywhere but couldn't find anything!I have 2 movieclips, the player and the ground which is sloped.Thanks for the help!
Have you tried:startHeight = //insert height of slope on the leftendHeight = //insert height of slope on the rightgradient = (endHeight - startHeight) / slope._widthdynHeight = startHeight + (player._x - slope._x) * gradientif( player.hitTestObject(slope) && player._y < dynHeight + slope._y ){ //insert code here}Excuse me if I have used the wrong syntax, havent used flash for a short while.
You must be logged in to post a reply!