Problem with gravity

Discuss any questions about BEPUphysics or problems encountered.
Post Reply
KakCAT
Posts: 32
Joined: Mon Apr 14, 2014 2:08 pm

Problem with gravity

Post 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
Norbo
Site Admin
Posts: 4929
Joined: Tue Jul 04, 2006 4:45 am

Re: Problem with gravity

Post 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().
KakCAT
Posts: 32
Joined: Mon Apr 14, 2014 2:08 pm

Re: Problem with gravity

Post by KakCAT »

thanks! It's working now :)
Post Reply