GMS 2 Applying sprites to physics joints?

Discussion in 'Programming' started by mastmartelli, Sep 13, 2019.

  1. mastmartelli

    mastmartelli Member

    Joined:
    Jan 17, 2019
    Posts:
    58
    I'm new to learning physics and I'm trying to create an object with two different fixtures to create a revolute joint. I'm trying to do all of this through one object with no sprite assigned. Is there anyway to assign each joint a separate sprite? If so, what would be the easiest way of doing so?
     
  2. Jezla

    Jezla Member

    Joined:
    Jun 20, 2016
    Posts:
    429
    You can save the joint id in a variable. You can then use the physics_joint_get value() function to get info from the joint, such as the anchor x and y, and use that to draw a sprite.
     

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