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

rotation

  1. M

    Rotate sprite when move direction is changed

    Hey guys, I'm pretty new to programming and recently got a problem which I can't solve on my own: if (horizontalgeschw != 0 || vertikalgeschw != 0) { while (angle_difference(direction,image_angle) < 0) { image_angle += 2; } while (angle_difference(direction,image_angle) < 0) {...
  2. N

    GameMaker Snap instance rotation in room editor

    Is there way to snap rotation at 45 and 90 degrees in GMS 2?
  3. C

    GameMaker Need help with having player shoot out of gun instead of out of center of player sprite.(SOLVED)

    Hello! I'm new to GameMaker 2 and have undertaken working on a top down shooter. I've figured out how to get the player to shoot but I cant seem to get how to get the bullets to come out of the gun instead of the middle of the sprite.(the gun is part of the sprite, not a separate object) And...
  4. BlueHarrier

    GameMaker Issue with the camera angle and surfaces [SOLVED]

    I've recently beeing working on a game that requieres the camera rotation (camera_set_view_angle(Camera, Angle)) and also works with surfaces. The problem I have is that the surface isn't drawing correctly when the camera is rotated. As I could observe, the surface rotates in the opposite...
  5. G

    GML Problem with rotation

    Hey there, I coded a little ship wich should turn in the direction of the mouse, and that's smothe I made it with a lerp command. But if I went with my mouse clockwise and passe on the direction 0 my ship turns couterclockwise until it's at the direction to my mouse, how can I fix this?? This...
  6. 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...
  7. Khenshiro

    Tiles Rotation (Game Maker Studio v1.4.1804 r44013)

    Hello, I'm trying to define a rotation for a tile in the room editor. For that, I choose my tile and I enter the properties of the tile with right click. The menu appears well, the Flip X and Flip Y checkboxes work, We can change the value of Scale X and Scale Y We can also define a color...
  8. Z

    Collision detection for rotating physics object

    I'm trying to detect a collision between a kinematic object, and a rotating non-kinematic object. Simply making the kinematic object non-kinematic isn't an option for performance purposes and because the object is supposed to a particle of sorts so it looks better without gravity. For...
  9. D

    Obj. Resets Rotation after movement (image_angle = dir)

    My obj in a top down click to move game has: image_angle = direction; It faces the direction it is moving towards, but once the movement stops, the sprite resets to it's original right-facing orientation. How can I force the sprite to stay pointed in it's last known direction? Thank you!
  10. S

    GameMaker [SOLVED] // Object stick to another and move together like 1 object even with rotation.

    Ok now is everything work good and i update this code. Now you can just copy the Code. // Variables image_angle = obj_player_player1.image_angle ; // Copying image_angle of another object in this case image angle of object1 is apply to image_angle object2 object_to_stick =...
  11. eggy spaghetti

    need help, I want my sprite to look in the direction of the mouse click

    when I click in the specific direction I want my sprite to look in the direction, so 4 directions, up, down, left, right, will appreciate any kind of help
  12. O

    GameMaker Player collides when rotating

    Hi guys, so I'm having a bit of an issue my character collides when rotating and sometimes even when not rotating so it's kinda weird. I've looked at other posts and they suggested to draw the player and use a variable to manage the image_angle. I did that but I'm not having any different...
  13. A

    Orient object's rotation to path

    Is there a way to make an object rotate as it goes along the path's curvature? For instance, if a path curves up, then the object will curve up as it hits that part of the path. Also, my objects have 0 speed, so can this be done without using the direction from speed relationship? Edit: by...
  14. O

    Circle Rotation With Touch

    Hi, i am working on this game where i have a circle and i rotate the circle with finger touch. The problem i am having is that every time i begin to touch the screen, my circle jumps to that angle. I want that wherever i touch, the circle should rotate keeping its angle relative to the touch...
  15. S

    GameMaker phy_fixed_rotation does not work as it should? [SOLVED]

    Hey, so in order to tune my bullet physics I created an object and I test forces and impulses on it. To be sure it stays in the right angle I thought that phy_fixed_rotation is the right command for the job. But the gravity or some external force still tries to turn the bullet to the right ever...
  16. 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...
  17. M

    Perfect 3D Camera Rotation

    GM Version: GMS 1.4 Target Platform: All Links: Basic First Person Camera Tutorial by The Sivart: Summary In this tutorial I will show you how to code a 3D camera rotation that can be done with the mouse. Compared to other 3D camera rotation codes with this one you can look anywhere from...
  18. J

    GameMaker Move in direction facing

    This is probably super easy but for the life of me it alludes me. I am trying to make a character sprite move in the direction it is facing I have built in rotation with when the left or the right key is pressed. Left key anti clockwise Right key clockwise I want to move forward in the...
  19. Fixer90

    Legacy GM Rotating tiles with code?

    Title says it all. Can tiles be rotated with code, even unconventionally? var ground = tile_get_ids_at_depth(1000010); for(var g = array_length_1d(ground), n = 0; n < g; n ++) { tile_set_rotation_oh_wait_this_function_doesnt_exist_darn_it(ground[n], choose(0, 90, 180, 270)); } NOTE: This...
  20. B

    Rotate Objects Around a Point

    I want to rotate some objects around a point (in this case the center of the screen). I'm looking to create an effect like in the bonus levels in the original Sonic the Hedgehog. I understand that this requires some trigonometric functions, though I'm not sure how to do them. Thanks for any...
Top