#### Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

# [Solved] Object Rotation

Posts: 97Member, PRO
edited November 2015

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!

• London, UK.Posts: 12,822Member

@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 ?

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

• Posts: 9,904Member

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.

• Posts: 97Member, PRO

@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?

• Posts: 97Member, PRO
edited November 2015

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!

• Posts: 11,613Member, Sous Chef, PRO, Senior Sous-Chef
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