[Solved] Object Rotation

RCT_GamesRCT_Games Member, PRO Posts: 97
edited November 2015 in Working with GS (Mac)

I want to make a object rotate as if it was spinning and coming at the actor, but I can't figure out how to make my object rotate on the center point. It keeps rotating from the bottom of my actor. The object that I am using is a taller object so I think thats why i'm having these issues.

I tried setting my center mass to the center point on my object, but so far nothing I do is working.

Currently I having a move set so the actor moves across the screen and theres a rotate.

Thanks!

Comments

  • SocksSocks London, UK.Member Posts: 12,822

    @RCT_Games said:
    . . . . I can't figure out how to make my object rotate on the center point.

    An actor rotates from its centre by default, you shouldn't have to change anything.

    @RCT_Games said:
    I tried setting my center mass to the center point on my object, but so far nothing I do is working.

    What happened when you change the COM ?

  • GnarlyGnarly canadaMember Posts: 840

    I'm guessing your image is not symmetrical. The center of your image does not equal center of the object?

  • The_Gamesalad_GuruThe_Gamesalad_Guru Member Posts: 9,922

    Center point is x = 0 y = 0. From an actors center of zero the number is negative going up and positive going down. So an actor 50x50 from middle to top is 0 throu -25. Middle to bottom is 0 throu 25. On the X the center to left is negative and center to right is positive.

  • RCT_GamesRCT_Games Member, PRO Posts: 97

    @Socks When I change it nothing seems to happen?

    @gattoman Thats correct my actor is 50 X 87

    I forgot to say that I have a custom Collision shape on, could that be the problem?

  • RCT_GamesRCT_Games Member, PRO Posts: 97
    edited November 2015

    @Socks @Lost_Oasis_Games @gattoman

    I figured it out. When I used PhysicsEditor to make my collision shape I moved the anchor point from 00 and doing that messed up the gamesalad anchor point. I made a new collision shape and did not move the point and now it's working correctly.

    Thanks for the help!

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    edited November 2015

    As has been mentioned, actors rotate from their center point. This is true regardless of their image (an actor doesn't have any way of knowing what its image looks like... it could be a white square or a unicorn).

    The image on the left is a poorly cropped image in Photoshop. The image on the right is the actor in GameSalad. You can see the center point (the point of rotation) in the exact center of the actor, unrelated to the image of the hammer. That actor is not going to rotate around the center point of the hammer.

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

  • GnarlyGnarly canadaMember Posts: 840

    Glad you found a solution.

Sign In or Register to comment.