0 Favourites

# How do I fix my platformer?

• 6 posts
• Ok i created everything like in the tutorial for a platformer (except the snail enemy) and i modified it a bit to be a shooter. I split my character into a lower half (legs) and upper half (arms,gun and head) and I made it follow the mouse but when i tried to make the upper part not flip when it aimed left i couldn't find a way to do it and is there a way to make a restriction like if it aims to a certain angle that it can't go in that direction anymore and can someone explain angle becouse i don't know where it starts or if it's 90 where will it point at?

• Hello friend <img src="{SMILIES_PATH}/icon_e_smile.gif" alt=":)" title="Smile">

Angles are quite simple once you get to understand it.

But basically if the angle is 0 it means it's going to the left. If it's 90Âº then it's downwards, 180Âº is right and 270Âº is upwards. So keep that in mind whenever you are drawing your sprites.

So if the sprite is following the mouse, it will turn 360Âº pointing to whatever direction the mouse is. I don't think that is quite a good idea to use this on the character of a platform game.

The most common thing to do is keep the character standing normally and use some type of target to follow the mouse around the screen.

But since I have no idea of what you're trying to do there, I can't explain much. But well...

I created a .capx about angles to help a guy on another post. You can take a look at it here:

https://dl.dropboxusercontent.com/u/183 ... otate.capx

• It doesn't matter I somehow got it, but thanks for telling me what angle points where!

• Those angles are incorrect. Zero degrees is directly right and angles increase clockwise from there. Down is 90 degrees, left is 180, up is 270.

• Yes! That's correct! 0 is right, that is what I was trying to say. I confused left with right... LOL sorry about that