Rotate Point

1° Sorry the terrible english, I'm Brazilian!

How make to create one point in on actor for use the "rotate, rotate to" ,
I don't want use the central point what the created, but yes one different...

thanks!
«1

Comments

  • sawkasteesawkastee Member Posts: 184
    I think you would want to use the actors self.position x & y. You can offset the x or y by adding +/-100 or whatever value you want to it.
  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    If you Google rotate offset gamesalad you'll find plenty of posts about that.

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • SocksSocks London, UK.Member Posts: 12,822
    I think you would want to use the actors self.position x & y. You can offset the x or y by adding +/-100 or whatever value you want to it.
    This will simply move the actor to a different position (where it will still rotate around it's centre).
  • RThurmanRThurman Member, Sous Chef, PRO Posts: 2,880
    This is not an automatic thing in GameSalad. There is no way to just designate where the pivot point should be (yet). I am sure the good folks at GameSalad will get to it eventually. Meanwhile, there is a way to do it yourself. But it requires some basic trigonometry. A demo can be found here:
    http://forums.gamesalad.com/discussion/comment/370605/#Comment_370605
  • How can I find out the coordinated ( point blank) of gameSalad in this image:
    https://www.box.com/s/1l18a81la5te323dlf4o
  • SocksSocks London, UK.Member Posts: 12,822
    edited March 2013
    @brunoocasali@gmail.com

    Constrain X to 36.5*sin( game.Time *150)+AAA
    Constrain Y to 36.5*cos( game.Time *150)+BBB
    Rotate / clockwise /speed 150

    AAA = wherever you want the centre of the clock arm to be in the X axis.
    BBB = wherever you want the centre of the clock arm to be in the Y axis.
  • I try to use the answer of "RThurman", but i can't to find the coordinates of the point blank;

    "Socks" I have to use only your answer or use with answer of the "RThurman"?
  • SocksSocks London, UK.Member Posts: 12,822
    edited March 2013


    "Socks" I have to use only your answer or use with answer of the "RThurman"?
    Never use my answers with the answer of the RThurman, it could cause an explosion, use each answer by itself.
  • SocksSocks London, UK.Member Posts: 12,822
    @brunoocasali@gmail.com

    Another trick to make things simple is to make the background to your 'clock hand' (I guess it's a clock hand) twice as long - with the clock hand down at one end - like this you can use a simple rotate behaviour.

    I hope that makes sense !
  • brunoocasali@gmail.combrunoocasali@gmail.com Member Posts: 20
    edited March 2013
    In reality this is a game! and is not a "wristwatch", is a rectangle and should revolve around the white point of the image!
    I try to use only your answer, I can only the night. After test I post to result
    and yes it seems with "clock hand"!! kkkkkk
  • SocksSocks London, UK.Member Posts: 12,822
  • I see a quick demo, but I want to rotate on the white point, as if a nail there...
  • SocksSocks London, UK.Member Posts: 12,822
    edited March 2013
    ///
  • Dude, I think I got kkkkkkk
    https://www.box.com/s/fay0h9ucvka6yoszuq5b

    I'll just change the image and is the end Thank you!!
  • I do not know, but I think I posted the wrong project, this is teh Project kkkkkk

    https://www.box.com/s/lkmohcwh5l4i1ya0pvh4
  • SocksSocks London, UK.Member Posts: 12,822
    edited March 2013
    Dude, I think I got kkkkk

    I don't know what "I think I got kkkkk" means ?

  • Dude, I think I got kkkkk

    I don't know what "I think I got kkkkk" means ?

    kkkkkk Google is a bad Translator... But I do not know what happened, my project does not work with the code after reopen, and i saved wrong,the latest project post
  • SocksSocks London, UK.Member Posts: 12,822

    kkkkkk Google is a bad Translator... But I do not know what happened, my project does not work with the code after reopen, and i saved wrong,the latest project post

    Well your English is better than my Portuguese ! :)

    But I don't really understand your question : (


  • @Socks is so, I need rotate my entire image on this white point. You know when an image is added to an actor he wears the center as a reference when execute to rotate, I want to rotate all in the white point
  • SocksSocks London, UK.Member Posts: 12,822
    @brunoocasali@gmail.com

    I made you a demo above.
  • I know but not happened, what I expected... !!
  • SocksSocks London, UK.Member Posts: 12,822
    I know but not happened, what I expected... !!
    ?

    In the demo the image rotates around the white point ?
  • she didn't not rotate in the image end,
  • SocksSocks London, UK.Member Posts: 12,822
    "Image end" = "white point" ?
  • No, it rotates in the extreme right image
  • RThurmanRThurman Member, Sous Chef, PRO Posts: 2,880
    edited April 2013


    "Socks" I have to use only your answer or use with answer of the "RThurman"?
    Never use my answers with the answer of the RThurman, it could cause an explosion, use each answer by itself.
    Too late! He crossed the streams!

    Bruno, this is what @Socks gave you:
    --Constrain Attribute: self.Position.X To: 35.5*sin(game.Time*150)+200
    --Constrain Attribute: self.Posiiton.Y To: 35.5*cos(game.Time*150)+150

    Bruno this is what you did:
    --Constrain Attribute: self.Position.X To: 35.5*sin(self.offSetX*150)+200
    --Constrain Attribute: self.Posiiton.Y To: 35.5*cos(self.offSetY*150)+150

    Do you see the difference?
  • but two solved nothing for me:
    the two examples
    https://www.box.com/s/jtacslsfbmj14bhkz74m

    notRotate2 : game.Time
    notRotatee : offSet's

    i want to rotate around the white point!! :)
  • RThurmanRThurman Member, Sous Chef, PRO Posts: 2,880
    edited April 2013
    The example using game.Time works just fine. But you need to fix some of the numbers.

    The first number needs to be the distance between the center of the actor and the point you want to rotate. The actor in your example is about 110 pixels tall. So the number would need to be around 55.

    Next, the rotation speed will always need to be the same as the "speed" multiplier. (If it is game.Time*150, then you need to set the rotation speed to 150.)

    So the behaviors are:
    Constrain Attribute: self.Position.X To: 55*sin(game.Time*150)+200
    Constrain Attribute: self.Posiiton.Y To: 55*cos(game.Time*150)+150
    Rotate (clockwise) Speed:150
  • Dude, I guess you don't understand my question...
    I want to rotate about the white point
    It would be as if he had a nail in place of the white point

    So it seems that it creates a circle around him and rotate
  • SocksSocks London, UK.Member Posts: 12,822
    edited April 2013
    Dude, I guess you don't understand my question...
    @brunoocasali@gmail.com



    Do you want your image to do this . . . ?

    image
Sign In or Register to comment.