actor is jerking

minimaxminimax Member Posts: 24
edited February 2012 in Working with GS (Mac)
Hello all,

I want to move an actor from the right edge to the left edge of the screen by using the behaviour "change velocitiy". The problem: The actor is jerking. ´dont know why? I´ve reduce the actor-size...´have change the behaviour to "move"...jerking!

Have anyone an answer?

Comments

  • POMPOM Member Posts: 2,599
    Maybe you have some rules that are conflicting , what other movement rules does this actor has?
    Did you flagged on the 'Use max speed' attribute ?

    Roy.
  • minimaxminimax Member Posts: 24
    Hi Roy,
    there is only a timer by controlling the movement for every 10 seconds. If the actor is colliding with an "trigger-actor" on the left edge another rule will bring the actor back to the startposition. To iterate this action i´ve creat the follow rule:
    when collide with trigger-actor
    constrain selfposition x to....(startposition)
    constrain selfposition y to....(startposition)
    change velocity to 0

    For every 10 seconds the movement starts again. Thats why i´ve changed the velocity in the rule by 0.
  • POMPOM Member Posts: 2,599
    Why do you need the timer for?!
    Roy
  • MotherHooseMotherHoose Member Posts: 2,456
    the constrains could be cause wreaking some havoc

    3 actorAttributes… all real type:
    -startX … set to the start X
    -startY … set to the start Y
    -myTime … leave blank

    2 Rules on your movingActor:
    1. Rule: when
    Attribute: self.Time ≥ self.myTime+10
    -changeAttribute: self.Motion.Linear Velocity.X To: whatever you want

    2. Rule: When
    Event: overlaps or collides with
    -changeAttribute: myTimer To: self.Time
    -changeAttribute: self.Position.X To: self.startX
    -changeAttribute: self.Position.Y To: self.startY
    -changeAttribute: self.Motion.Linear Velocity.X To: 0

    no additional timers as the actor's time triggers events … and that is always tracking in runtime

    @};- MH
  • jckmcgrawjckmcgraw Member Posts: 647
    @minimax Use the interpolate action (self.position.x)
  • chaleychaley Member, PRO Posts: 226
    Layering sometimes causes constraints to go squirrely. In my game... the actor that is "constrained to" has to be below the actor that is being constrained in the layer stack. If the constrained actor is below the "constrained to" actor in the stack, it jitters all over the place.
  • minimaxminimax Member Posts: 24
    Hi,

    and thanks to all! I´ve tested it with the behavious "linear velocity" and "interpolate"....without success. I´ve changed the behavious "constrain attribute" to "change attribute" by this actor. Jerking!

    Is it possible actors without seemingly coherence affecting the movements?
  • MotherHooseMotherHoose Member Posts: 2,456
    could you post the actor's image ?

    @};- MH
Sign In or Register to comment.