• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

angles

  1. V

    SOLVED How to check the distance between two angles and choose the better way to reach an angle

    Hi everyone! In my project, I have a player that has a direction and objective variables. For example, my actual direction is 0, so my image angle is 0, and my player's sprite is looking to the right. Well, if I press "W," my objective is equal to 90, so direction is going to add 10 until it...
  2. E

    Check Objects With Angles

    How can I check objects using angles and directions? For example, if I need to check the floor of a character that can stick to walls and slopes, but if I stay at half an angle (for example 14.25 degrees) and I need to check if it is stuck to something, as this is a strange distance I would need...
  3. P

    GameMaker How to "Encircle (surround)" an enemy ???

    Hi, first of all let me thank to all repoders and apologize for my broken English. I'm working on a game where enemies are eliminated by various kinds of movement (through them, to stay for a while close to theme, etc.). One way should be to encircle the enemy. You press a button and move...
  4. Solthall

    SOLVED Collision issue (works from all angles but one)

    Hello. Got some weird issue with my collision. I'm aware that this might not be the best code, but I'm still learning. Hard to find complete tutorials on top down movement and collisions (taking sprite/mask rotations into account). But managed to draw the player sprites in the draw event, even...
  5. P

    SOLVED Maths for angle depending on destination(1 or -1)

    Hello everybody, I know I post here quite often, and many of my posts are totally unnecesarry sometimes because they are just my silly mistakes, but it really helps to start posting here, because when I start preparing information for other people to help me I usually find answer much quicker...
  6. Bulldrome

    Object Angle Help

    Hello, I'm new to the forums and GMS2 in general so forgive my inexperience. So I'm currently having a problem with getting the angle of an object to work correctly. I'm trying to have this object, a shield, move around the player by using the directional keys. Up would set its angle to 90...
  7. S

    [Solved]Rotating a sprite toward a specific angle

    i am trying to make an arrow for a game, they mode along lengthdir_x & y based on their variable, angle the angle variable needs to move toward 180 degrees witch ever direction is shortest from the current angle, but it gets muddled up at the 0, 360 mark becouse its to the right, not...
  8. B

    How to check if a player is facing another...

    I'm building a top-down shooter. I have a target-A which basically sits in the center of the room I have ships which fly around the room in various formation patterns or whatever. The ships have laserbeams that fire directly forward. I want the ships, as they fly about the room - to check...
  9. B

    Legacy GM Changing sprite at a certain angle

    So here's the deal. As beginner practice, I'm making a very simple top-down shooter where my character shoots with his middle finger (yeh) which follows my mouse cursor. I've figured out how this is done, but what bothers me is that I can't change the yscale at a certain angle so that the hand...
  10. P

    GameMaker [Solved] Rotating camera by shortest distance?

    Basically, the direction that the player falls in can change and I want the camera to rotate such that the bottom of the screen corresponds with the new direction of gravity. i.e if the direction of gravity is 180 degrees, the camera should rotate 90 degrees so that the player appears to be...
  11. D

    Legacy GM What is the most efficient method of angle calculation

    Hello, I'm trying to make a sonic like platformer. I would like the player to dynamically change according to the angle of the ground. I don't know what would be the quickest method. I don't want to use the small object/angle variables method because I feel that would become cumbersome and...
  12. C

    2D bounce and reflection

    Hi there! This is a problem I've been chewing on for a while that I can't seem to fully grasp. I'm just trying to take a ball and have it bounce around a room at a constant rate, say a breakout ball just launching around the room. It hits a wall, and then it bounces off the wall at the angle of...
  13. D

    Help with speed adjustment based on ground angle

    So after about two months I finally figured out the code to this sonic like platforming engine. There are a few things that still elude my right now and this is one of the big ones. So I have the character able to rotate and move according to the angle of the ground, that is found by two sensor...
  14. D

    Speed increase/decrease according to ground angle

    Hello GMC, I'm working on a sonic-esqe physics engine. I have the movement in all 4 quadrants working correctly but I can't seem to get the player to slow when going up a slope or speed up when going down. I've read though the guide at Sonic Retro many times but I used a slightly different...
  15. G

    Angle comparison problem

    My project is a topview action game. The player can move freely in any direction. I wanted to add a "speed" mode, where the player, instead of moving pending on your keyboard direction (up down left right), could move pending on the direction of the mouse. He would be a lot faster than walk mode...
  16. R

    GML Placing object by distance and angle, rather than x and y?

    Hi everyone! Strange query I'm afraid, and it could just be me not seeing the whole picture! I was wondering if anyone knew of a way to control the placement of an object using the angel and distance between two objects, rather than x and y? Conventionally I'd call something like...
  17. Joe Ellis

    GML [SOLVED] Wall & slope collisions, wall slide, sliding against

    Hi everyone, yesterday I found out how to make an object slide against an angled surface, in the same way that most fps games do, where the player rather than stopping still when it bumps into a wall, it slides along it at the angle of the wall, I spent quite a while looking on google and found...
  18. A Random Creator

    3D [SOLVED] 3D bullets

    Its pretty straight forward. I want to create a bullet in 3D move toward where the camera is facing. my camera angle variables are dir (the horizontal rotation) vdir (the vertical rotation) if you have more questions, just ask! thanks!
  19. M

    Move an object by a fixed angle

    like the title says this is my problem I drew up a representation of how I wanted the object to move which looks like this The current code I have for the enemy object is to move based on the purple line which is always going to be a straight line, so how would I add an angle to make the enemy...
Top