angle movement

  1. Qlak

    GML [SOLVED] Efficient Angle Check - 359 and 0 degrees

    Hey guys! I'm having hard time when it comes to checking angles. I managed to achieve what I wanted, but I'm sure that there must be a better way, because my code is not clean for sure. Maybe you could help me out :): -For instance, imagine that you have traditional top-up 2d shooter, left...
  2. J

    GML Help with angled player kickback mechanic.

    Hi everyone, I'd like to start by saying I'm a complete novice to programming. I've been following a video by Shaun Spalding on kick back. I thought it would be a cool idea to make a game around this mechanic, but I've came a across a problem. When shooting at an angle and the player is...
  3. M

    Bullet ricochet

    Hey everyone, I am working on an project with a bullet ricochet. I tried it my way, but it worked only on the x collision. I can't see the problem. Here is my code: if(place_meeting(x, y, oCollision)) { if(spd > 10){ direction = 2 * (direction - direction) +...
  4. N

    GML [SOLVED] Track angle dif for drag and swing sword

    I have a sword with angle approaching a point_direction at mouse. What I want is, when I click the mouse I can start drag its angle and when I release the mouse, the sword swing approach the angle stored at the start (when the mouse clicked.) Then starts again. I do drag from angle 5 to -5 but...
  5. H

    Adaptive Rotation(Animation)?

    Hey, I am new to the software, using gm2, and I am working on a "press space dodging game" all the mechanics are pressing space. My question is, when I press space and it goes right, I want it to either play a sprite animation or rotate a static one to the right side, BUT if the animation or...
  6. 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...
  7. W

    Graphics Full top down or angled or rotate

    Hi. Before I will continue with my game I want to ask what is the best option. Game is something like sci-fi Grand Theft Auto with "rich" story. It is cliche, but I must say to my self it is rich story. Lots of people said that top down is boring and you can see only head and shoulders so for...
  8. D

    (SOLVED)How can I make a bullet appear from the end of a gun when the gun can change angle??

    I have a system set up where you aim with the mouse but I can't figure out how to make the bullet spawn from what ever angle my gun is at. I need a way to some how check the angle the gun is so I can update the x and y potions for the bullet creation.
  9. P

    GMS 2 top-down tilemap collison with rotated rectangles/collision mask

    so I'm not sure how to describe this.... I know how to make a working tile collision with bounding boxes and 4-corner checks (typical platformer collision style) this works all nice and fine since the "shapes" are all lined up in 90° angles and corners but for my little testing project (to toy...
  10. 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...
  11. D

    Move direction

    I'm making a top-down game in which my player is facing to the top of the screen at all times, and instead the floor is rotating when I move the mouse. is there any way I could make my character move forwards, backwards, left and right in the direction which my sprite is facing? the direction...
  12. M

    [Physics] Change sprite angle on sloping ground

    Hey guys. I have a problem here with the physics environment.My player is designed to be on a skateboard. I want my player to rotate its sprite, according to the kind of fixture(up or down slopes) he is moving on.I've tried everything i could and everything i could find, but it didn't help me...