Constraining help

mc99093mc99093 Member, PRO Posts: 133
edited March 2015 in Working with GS (Mac)

I'm creating a bulldozer and I'm having trouble with the pushing arm. I want it to be able to rotate up and down freely and move with the bulldozer. I've constrained the arm X and Y positions to a offset point for the rotation which works great. I don't know how to keep it constrained to the body of the bulldozer to move with it since the X and Y positions are already constrained for the offset rotation. I've included the project any help would be great.

https://www.dropbox.com/s/zj0sqbc9fhq3yph/bulldozer.zip?dl=0

Comments

  • SocksSocks London, UK.Member Posts: 12,822

    @mc99093 said:
    I want it to be able to rotate up and down freely and move with the bulldozer. I've constrained the arm X and Y positions to a offset point for the rotation which works great. I don't know how to keep it constrained to the body of the bulldozer to move with it since the X and Y positions are already constrained for the offset rotation.

    You just need to add the bulldozer's position to the constrain behaviours.

    I've attached a (simplified) example file.

  • mc99093mc99093 Member, PRO Posts: 133

    Thanks a lot! ;)

  • SocksSocks London, UK.Member Posts: 12,822

    @mc99093 said:
    Thanks a lot! ;)

    No problem, obviously the attribute called 'Rotation Angle' in the arm actor controls the angle of the arm, so you can control this however you like for your game, for instance via a dial or slider or - as it is now - a simple click that interpolates the angle between two values.

Sign In or Register to comment.