1. Hey! Guest! The 36th GMC Jam will take place between February 27th, 12:00 UTC - March 2nd, 12:00 UTC. Why not join in! Click here to find out more!
    Dismiss Notice
  2. NOTICE: We will be applying a Xenforo update on Tuesday 25th of February. This means that from approximately 10:00 to 14:00 BST the forums will be offline (or possibly longer). Sorry for the inconvenience! Official Announcement here.

Best way to center an object in a room.

Discussion in 'Programming' started by Jac Thiebeau (Cyberhroom), Sep 26, 2018.

  1. Jac Thiebeau (Cyberhroom)

    Jac Thiebeau (Cyberhroom) Member

    Joined:
    Sep 25, 2018
    Posts:
    19
    Can anyone tell me what is the best method/command to center an object in a room? I am making a simple Pong clone for my first game and would want to know using a snap on grid of 32x32 where the best position of the ball is.

    Thanks in advance!
     
  2. Homeless_Pixel

    Homeless_Pixel Member

    Joined:
    Sep 1, 2016
    Posts:
    39
    Instance_create(room_width/2,room_height/2,obj_ball)
     
  3. Jac Thiebeau (Cyberhroom)

    Jac Thiebeau (Cyberhroom) Member

    Joined:
    Sep 25, 2018
    Posts:
    19

Share This Page