speed of actor with camera and touch

PaxPaxPaxPax Member Posts: 106
I have an actor with the code: control camera and also constrain self.position x to touch + scene camera origin x (same thing for y). Scene width is 2000. The actor moves perfect with the touch until it gets outside the normal iphone width . When it gets to 568 and beyond(iphone landscape-568---I think this is where it happens or maybe something else to do with camera ), it goes into WARP speed. Warp speed is a the problem.

I have watched a few videos(t-shirtbooth etc.) but could not determine what I am doing wrong.

Any suggestions will be appreciated.

Cheers

Best Answer

  • RThurmanRThurman Posts: 2,880
    Accepted Answer
    @PaxPax -- it might be due to setting the camera too tightly. Try moving the camera boundaries out to their original positions.

Answers

  • PaxPaxPaxPax Member Posts: 106
    Hi, sorry if it is too early to bump...thought I might catch 'different time zones'. This is my first time using 'camera'. I am sure it is something simple I am doing wrong----again!!!

    Thanks in advance

    cheers
  • ozlacozlac Member Posts: 33
    Try this vectorToAngle( game.Mouse.Position.X + game.camera origin X - self.Position.X , game.Mouse.Position.Y + game.camera origin Y - self.Position.Y )
  • PaxPaxPaxPax Member Posts: 106
    Thanks ozlac but could not get your suggestion to work at all...I know it is me!!!

    I hope someone can give me further guidance.

    cheers



  • PaxPaxPaxPax Member Posts: 106
    @wingmanapps

    Thanks for the above video. I have made the attributes(when originally started this project-should have been more clear in my first post) t-shirt booth refers to in order to allow 'touch' to work once passed the initial size of screen. I named them cam x and y. So my rule is constrain self position x to game touchx + gamecamx. Same for y. I have an instance actor that constrains gamecamx to scenecameraoriginx. Same for y.

    Still only get warp speed once actor arrives at initial scene edge.



    Thanks again, really appreciate it!!!

    Wish my brain would work at warp speed and get this issue behind me. :@)
  • PaxPaxPaxPax Member Posts: 106
    @RThurman it might be due to setting the camera too tightly. Try moving the camera boundaries out to their original positions.

    Thanks you so much!!! It is much better now.

    Cheers

  • RThurmanRThurman Member, Sous Chef, PRO Posts: 2,880
    Glad its going to work for you!
Sign In or Register to comment.