Gravity Angle with physics objects?

Forum Home Forum Home > Construct 2 General > How do I....?
 Post Reply Post Reply
Author
4,558 Rep
Post Options Post Options   Quote rfisher Quote  Post ReplyReply Direct Link To This Post Topic: Gravity Angle with physics objects?
    Posted: 12 May 2012 at 7:47pm
I'm trying to rotate a layout or layer while maintaining the gravity angle the same. This is with physics objects. My example would be that i have a rectangle with a ball on top of it and as i rotate the layout or layer the ball should roll off and its not. Does anybody have any examples on how to do this?
Back to Top
19,090 Rep
Post Options Post Options   Quote sqiddster Quote  Post ReplyReply Direct Link To This Post Posted: 12 May 2012 at 8:07pm
The best way to do this is to turn off the real gravity of your physics objects. Then add them to a family, and apply a force at angle on this family. The force should be the intensity of gravity you want, and the angle should be the gravity angle.
Hope this makes it clear for you.
Back to Top
4,558 Rep
Post Options Post Options   Quote rfisher Quote  Post ReplyReply Direct Link To This Post Posted: 12 May 2012 at 8:19pm
Thanks, i would have never thought of that.
Back to Top
4,558 Rep
Post Options Post Options   Quote rfisher Quote  Post ReplyReply Direct Link To This Post Posted: 12 May 2012 at 9:49pm
Worked, but since i can't set the orgin of rotation it will not work for what i'm doing.

I'm going to use the following so i can rotate all objects around a point.

x = cx + r * cos(a)
y = cy + r * sin(a)
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down