Gravity Angle with physics objects? Forum Home > Construct 2 General > How do I....? |
Post Reply
|
| Author | |
Post Options
Quote Reply
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?
|
|
![]() |
|
Post Options
Quote Reply
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. |
|
![]() |
|
Post Options
Quote Reply
Posted: 12 May 2012 at 8:19pm |
|
|
Thanks, i would have never thought of that.
|
|
![]() |
|
Post Options
Quote Reply
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) |
|
![]() |
|
Post Reply
|
| Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |