Discussion Moving Kinematic Object in Physics Room

Discussion in 'GameMaker Studio 2 Community Tech Support' started by RVZ, Sep 6, 2019.

  1. RVZ

    RVZ Member

    Joined:
    Jul 7, 2016
    Posts:
    12
    I'm trying something out working with physics and still a bit new to it. I'm using physic in a room, but I have one object that I don't want to react to gravity, but still want to collide with other objects. So the way I understand it, is that I need to make it kinematic, and the density needs to be 0? So that alone works fine, but I also want to move this object.

    Without density at 0 I can move it with: "physics_apply_force(x, y, 0, -10)". But then gravity affects the object.

    With density at 0 gravity doesn't affect it, but then I can't move it?

    What am I missing here?
     
  2. Jezla

    Jezla Member

    Joined:
    Jun 20, 2016
    Posts:
    426
    Kinematic objects have to be moved by setting phy_speed_x and phy_speed_y directly.
     
  3. RVZ

    RVZ Member

    Joined:
    Jul 7, 2016
    Posts:
    12
    Wow, can't believe it was that simple. Thanks! :)
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice