Moving an actor in a semi-circular motion while facing outwards

124»

Comments

  • SnapFireSnapFire Member Posts: 361
    I did include them. However, they look like this:
    Constrain self.position.x to 80*cos( self.targetAngle )+ game.BlockX
    and the other on is just sin and blockY.

    So how the target angle turned out this time must be influencing it. Does that make sense? I swear I didn't do anything to change BlockX or BlockY.

    -Thomas
  • SnapFireSnapFire Member Posts: 361
    Trying what you dais for flat now. Did you mean to put accelerometer.y and not x?
  • SnapFireSnapFire Member Posts: 361
    So the accelerometer on the flat one works, but is backwards.
    If you tilt it to the right, it goes to the left and vise versa.

    I'm going to try changing the minus sign after the first self.position.x to a plus sign and see if that helps.
  • SnapFireSnapFire Member Posts: 361
    Also, I have two areas of the screen that need to be touched at the same time. The "touchable" area for the paddle, and another part that changes the color of the paddle. Ho could i do this when sometimes one of them will be activated with the first touch, and sometimes the second?

    thanks,
    -Thomas
  • RThurmanRThurman Member, Sous Chef, PRO Posts: 2,881
    If it is in landscape mode then use .Y if in portrait then use .X (I assume that you are working in landscape.)

    It its on its side, then the hardware does not change orientation, you need to use the y accelerometer as if it is the x accelerometer.
  • RThurmanRThurman Member, Sous Chef, PRO Posts: 2,881
    Good luck with the logic of touch areas! You will probably need a couple of boolean attributes to keep track of what got touched first (and then use touch1 and touch2 accordingly). Its all doable, but requires a bit of logic to keep track of things.
  • SnapFireSnapFire Member Posts: 361
    Ah... I've got it. (I am on landscape)

    How do you think i should approach my other problem --- the multi-touch one?
    Also, I tried doing what i said above, by changing to a positive, but it made it jerky and messed up. Is there some other characteristic I need to add?
  • SnapFireSnapFire Member Posts: 361
    I have an idea for the multi-touch!
  • SnapFireSnapFire Member Posts: 361
    Think i'll try it out tomorow though. It is 3 where I am.
    Good Night --- Thanks again for all your help.

    Let me know if you think of a solution to the opposite problem i was having.
  • RThurmanRThurman Member, Sous Chef, PRO Posts: 2,881
    Just to complete things, try this with the pointer level (the one that only rotates and does not change position).

    when the mouse is down
    ---- Constrain Attribute: self.Rotation To: self.Rotation +((vectorToAngle( game.Touches.Touch 1.X - self.Position.X , game.Touches.Touch 1.Y - self.Position.Y )- self.Rotation )*.06)
    otherwise
    ---- Constrain Attribute: self.Rotation To: min(180,max(0, self.Rotation +(((vectorToAngle( game.Accelerometer.X , game.Accelerometer.Y )-90)%360)- self.Rotation )*.1))
  • SnapFireSnapFire Member Posts: 361
    I'll try that real quick
  • SnapFireSnapFire Member Posts: 361
    Actor still does that weird thing on the touch version. I'm starting to think it's some other actor causing it. I'll check it out tomorrow. Testing Accel. now.

    Also, do you have to reload the page every time to submit a new comment or is that just me?
  • SnapFireSnapFire Member Posts: 361
    Hey, there are a few small probs with the accelerometer version, but that'll have to wait until tomorrow. Good Nigh and thanks once more.
  • SnapFireSnapFire Member Posts: 361
    Also, do you have to reload the page every time to submit a new comment or is that just me?

    Just wondering. Back to work on the project now. I'll let you know what I find out.
    -Thomas
  • SnapFireSnapFire Member Posts: 361
    Hey, so i've been looking into all this stuff.

    1) Backwards accelerometer on Catch and Block
    2) Touch and Accelerometer not working on Bounce

    Catch is the flat level, block is the arc one, and bounce is the rotating one. May as well call them by their names.

    Any ideas on any of this stuff? Also, the touch is not backwards in block and catch, in case that matters.
    -Thomas
  • SnapFireSnapFire Member Posts: 361
    Hey,

    If anyone has any ideas on the problems I stated above, PLEASE let me know. I have to publish this tonight and this is really the last things it needs.

    Thank you so much,
    -Thomas
  • SnapFireSnapFire Member Posts: 361
    Anyone?

    -Thomas
  • RThurmanRThurman Member, Sous Chef, PRO Posts: 2,881
    If you want -- I can take a look at it. PM me an address to download it.
    RThurman
  • SnapFireSnapFire Member Posts: 361
    Are you working on it now? Please let me know when you are so I will stop.
  • RThurmanRThurman Member, Sous Chef, PRO Posts: 2,881
    Hey,

    I sent you a PM with a link to an example file. It should be pretty close to what you are looking for.

    RThurman
Sign In or Register to comment.