Page 1 of 1

Problem with gravity

Posted: Mon Apr 14, 2014 2:13 pm
by KakCAT
Hi!

I'm trying to make a little wooden maze game: a ball and a maze, and you must move your phone to go through the maze.

Instead of rotating the whole mesh, I'm changing the gravity's direction: Instead of falling downwards I calculate the angle of the board and recalculate the new gravity as if I rotated the board.

It works pretty well while the ball is moving, but once the ball stops there's not way to make it move again (I suppose it enters in a "static state" where it can't be removed from there unless there's something else that touches it).

What would be the best way to keep the ball in a "never static" state?

Thanks a lot,
Kak

Re: Problem with gravity

Posted: Mon Apr 14, 2014 8:30 pm
by Norbo
Setting entity.ActivityInformation.IsAlwaysActive = true would do the trick. If the gravity only changes every once in a while, dynamic objects could be explicitly activated on demand by calling entity.ActivityInformation.Activate().

Re: Problem with gravity

Posted: Wed Apr 16, 2014 1:44 pm
by KakCAT
thanks! It's working now :)