Joystick Problem

GameCre8torGameCre8tor Member Posts: 49
edited November -1 in Working with GS (Mac)
Hi guys,

With codemonkey's joystick demo, when you release the joystick, the character always rotates back to 0 degrees (facing right).

My question is how to stop this from happening and when you let go of the stick, the character stays at the rotational position when you release the stick, instead of it rotating back to 0 degrees.

Any help would be appreciated,
GameCre8tor.

Comments

  • scitunesscitunes Member, Sous Chef Posts: 4,047
    open the otherwise section of the "Rule: Determine which touch number is controlling" rule and remove the two change attribute behaviors.
  • GameCre8torGameCre8tor Member Posts: 49
    Which actor is that rule in?
  • scitunesscitunes Member, Sous Chef Posts: 4,047
    the stick
  • GameCre8torGameCre8tor Member Posts: 49
    I don't think I have that Rule?! Any other suggestions?
  • MarkOnTheIronMarkOnTheIron Member Posts: 1,447
    For everyone interested I was just having the same problem and since scitunes tip didn't help I tried something different.

    In the actor controlled by the stick go to the rule constraining the actor to the Angle set by the stick and wrap it in a rule:

    When Attribute
    StickGrabbed = true
    ---Constrain attribute "self.rotation" to "game.Angle"
    otherwise
    ---Change attribute "self.rotation" to "game.Angle"
    ---Change attribute "self.Motion.Angular Velocity" to "0"
  • AppArcadeAppArcade Member Posts: 64
    Otherwise is IN the actual rule! :D
Sign In or Register to comment.