• 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!

angle

  1. sv3nxd

    GML [Solved] Reflection Formula

    Sooo ... I had a game-idea where you could draw straight lines/walls with your mouse, which can bounce back projectiles. I first thought the code must be simple but I'm losing all patience after trying and trying, but not getting any results. I have ... - angle of the surface - angle of the...
  2. PlayerOne

    GameMaker Bullets angle when player is moving

    Title says it all. I'm trying to get the player to shoot properly but the bullets keep moving at angle everytime the player character moves. Trying to make a metal slug style system where you shoot 4 ways. Any help is appreciated. I'm sure it's something simple I'm overlooking. var _xx=0 var...
  3. Daniel Mallett

    GameMaker draw_sprite_general rotation

    I'm using draw_sprite_general. It works fine when its not rotated, but as soon as you rotate it the left, top, width, height is also rotated. The links below show a screenshot of both rotated and non rotated versions. This should make it much clearer. (Not Rotated)...
  4. S

    GameMaker [Unsolved/Closed] Rotate Around Center Using draw_sprite_general

    I want to draw a gun sprite and have it look towards the mouse. So far the rotation is based around where the drawing is made which is the top left. How can I make it rotate around the center of the drawn image using draw_sprite_general. I know using draw_sprite_ext fixes this but I would like...
  5. 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) +...
  6. V

    GameMaker Help with simple 2d camera rotation

    I’m building a game where the player should be able to rotate the camera and the gravity will shift to the new orientation. But I’m having some problems with my rotated camera. My room has a viewport of 320x240 px (20x15 tiles) Viewports are enabled. My camera object in the room is setup like...
  7. K

    Lerping the camera

    Hey guys, So when rotating the camera in my game 90 degrees im coming across a problem with going from 270 - 360. because it treats the camera angle as 0, not 360, it causes the camera angle to whip around in the opposite direction. here's my step code for setting it. if global.grav = 1 {...
  8. 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...
  9. P

    GameMaker Swinging Separate Sword Sprite Around A Player

    Hey guys, I have been programming on game maker for about a year now. I need help with this problem, right now i'm trying to make a separate sword sprite (obj_melee), swing around the player (obj_player) at a 45 degree angle in the pointing direction of where i click the mouse. I also need help...
  10. acidemic

    GML Check if a shape is convex/concave & get an angle between three points

    GM Version: GM:S 1.x | GMS 2.x Target Platform: All Download: N/A Summary: Use following code to find out whether a shape is convex or concave. It can be placed in "User" action of an object and run on request. Shape coordinates must be supplied as DS List in a 'list' variable. End result is...
  11. 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...
  12. M

    Discussion Rotation Offset Problems

    Hello, Working in a project were I needed a bit of precision with pixels I've noticed that after changing image_angle my object would shift it's drawing position even though the sprite had even dimensions. The sprite is wrongly drawn because it is rotating the center as well, although it...
  13. M

    [SOLVED] How to find collison angle?

    Hi guys, I'm currently working on the collisions in my game and I want to make it so that the player can slide along the walls when he hits them and not just stops. Also I don't want to be restricted to only horizontal and vertical walls so I came up with this idea: "next pos." is the next...
  14. X

    Legacy GM [SOLVED] Rotation angle limiting

    I'm having trouble adapting some code. I have a stationary turret that the player can pan back and forth by changing its image_angle with the arrow keys. I want to limit its rotation to a minimum and maximum angle from its original position. The tutorial I followed does exactly what I want...
  15. C

    GameMaker Find first object that intersects between player and mouse cursor

    Hey there, I'm new to gamemaker studio 2 and trying to figure out how to write this code. Essentially I want to find the line between the player object (obj_player) and the mouse cursor and then find the closest instance of an object (obj_movable) that's intersected by that line. In the...
  16. B

    angle_difference doesn't work?

    There is no angle_difference function in version that im using (Proffesional 1.99), so what else could I use? Thanks!
  17. N

    GameMaker Bullet collision issue!

    Hi guys, i'm making a sort of roguelike game and i'm struggling with an annoying issue about bullet collisions. My game has a resolution of 1280x720 and view is set with 640x360. My sprites are 32x32, 16x16 or 64x64. I have a player that can shoots bullets with this code: I have also two solid...
  18. T

    Freeze sprite Angle/Direction

    Hi, I've a obj_player direction (movement state) based on the mouse cursor and the center of the room. direction = point_direction(room_width/2,room_height/2,mouse_x,mouse_y); image_angle = direction; I've create a sprite sheet for the attack. During the attack animation I want to: 1) move...
  19. Ziberteck

    Please delete

    Please Delete
  20. mar_cuz

    GameMaker Lock Joystick Movement To One Angle

    Hi All, I'm trying to have my player move with the left stick of a game pad but back and forth on one angle only. So the angle can be: push_angle = point_direction(oGoal.x,oGoal.y, x,y); I only want to move on that axis (push_angle) back and forth and the player cannot move from that angle...
Top