I'm trying to develop an air dash in a platformer where the player dashes in the direction of "angle(Player.X, Player.Y, Mouse.X, Mouse.Y)". I've set up an instance variable called DashAngle and use the Move 20 pixels at DashAngle.
My problem with the code is that no matter what I do, you can "dash" through solid objects. I've tried instead of "Move 20 pixels at DashAngle" to disable Platform on the player and enable the Bullet behavior instead, and that also gets the same issue.
To fix this, I've input a line that basically states if you dash into a solid, cancel the dash. This works fine - but it seems slightly strange if you're dashing UP to a spot. If you hit the side of the solid, you stop dashing altogether and fall back down. So my actual question is:
Is there a way to utilize an air dash with solids being involved (ie. pushing towards the solid at the angle specified instead of going THROUGH it)
In case none of this made any sense, here's my code:
<img src="https://dl.dropboxusercontent.com/u/28104568/AirDash1.PNG" border="0" />
Any help would be greatly appreciated.