Problem with rotating around another actor [VIDEO INCLUDED]

NtGNtG Member Posts: 103
edited November -1 in Working with GS (Mac)
Hey, im having this problem with rotating my actor around another actor (if you saw my thread, you are already aware that im trying to get sort of a swinging motion) :



I have it so if i press "right" it should rotate counter clockwise, and left rotates clockwise, however, imagine the center of the brick is the origin of a graph, when rotating left it slows down in the 2nd and 4th quandrants, and going right slows down in the 1st and 3rd. I turned gravity off and all that other stuff, I cant figure out whats wrong. Any help?

Comments

  • scitunesscitunes Member, Sous Chef Posts: 4,047
    How are you getting the rotation to change? Are you using interpolate? If so is it possible that you set it to ease in/out?

    Just a thought.

    The more detail you give the more help we can give you.
  • NtGNtG Member Posts: 103
    scitunes said:
    How are you getting the rotation to change? Are you using interpolate? If so is it possible that you set it to ease in/out?

    Just a thought.

    The more detail you give the more help we can give you.

    Im using this, all on the object rotating around the brick:

    (keep in circle):
    Constrain self.position.Y to "game.Post Y + self.radius *sin(vectorToAngle( self.Position.X - game.Post X , self.Position.Y - game.Post Y ))"

    Constrain self.position.X to "game.Post X + self.radius *cos(vectorToAngle( self.Position.X - game.Post X , self.Position.Y - game.Post Y ))"

    (to keep the actor pointed towards the brick):
    Constrain self.Rotation to self.angle-90

    (movement)
    if key left is pressed:
    accelerate to 180° relative to actor

    if key right is pressed:
    accelerate to 0° relative to actor

    i've noticed that putting the left and right movement at 135 and 45, respectively, makes the movement a little bit smoother. (those are the values used in the video)
  • NtGNtG Member Posts: 103
    I hate bumping stuff, but can anyone help out? If I can get this problem fixed, then all of the programming of my game is pretty much done. It's all graphics and level design from here on out.
  • NtGNtG Member Posts: 103
    can someone move this to the general "working with game salad" section since this sub-forum seems to be rather inactive and my other thread got deleted? thanks

    ...or just delete this thread and allow me to repost.
  • NtGNtG Member Posts: 103
    tshirtbooth said:
    moved!

    Thanks! If nobody comments to help make this work, how much would it cost me to hire you to get this working?
  • NtGNtG Member Posts: 103
    tshirtbooth said:
    to be honest and this may be why none is helping. But i have no clue what your asking :(
    im not sure i understand your issue.

    cheers

    Ok, im probably making it a lot more confusing than it needs to be. A simpler description of the problem would be that i cant get a smooth circular motion.
  • morphinegamingmachinemorphinegamingmachine Member, PRO Posts: 449
    your using accelerate to angle, acceleration wont be even movement
    or i misread what u want
  • NtGNtG Member Posts: 103
    tshirtbooth said:
    your long bar is that rotating from the bottom of the centre?

    disregard the rope, the yellow circle/oval actor is constrained to a circle of radius 100 from the center of the gold bar/brick and i need it so that when left is pressed the oval accelerates smoothly in a clockwise motion around the brick and counter clockwise for movement to the right. However when looking at it as if it were a coordinate plane with the center of the brick as the origin, when moving clockwise it slows down in the 2nd and 4th quandrants, and moving counter-clockwise slows down in the 1st and 3rd.

    quadrants of a coordinate plane:
    http://www.math.com/school/subject2/images/S2U4L1DP.gif
    morphinegamingmachine said:
    your using accelerate to angle, acceleration wont be even movement
    or i misread what u want

    i have to use acceleration because i want to apply gravity to it later in order to create a swinging motion that can gain momentum.
  • NtGNtG Member Posts: 103
    morphine was right, i need to find a substitute for acceleration
  • RThurmanRThurman Member, Sous Chef, PRO Posts: 2,881
    Do you need to apply gravity for real (using accelerometers) or do you mean you want use GS gravity.

    Do you need it to swing like a pendulum (and lose momentum).

    Or did you really mean that you want it to gain momentum (even on the upswing).

    Does it need to swing all the way around in both directions. (So that it goes past 360 and needs to take going past 360 and back to 0 into account.)

    All these questions (and more) will impact how you want to solve this.
Sign In or Register to comment.