Box2D Forums

It is currently Thu May 23, 2013 9:39 pm

All times are UTC - 8 hours [ DST ]




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: Re: set body to sleep?
PostPosted: Mon Mar 17, 2008 1:59 pm 
Offline
Site Admin

Joined: Thu Sep 06, 2007 12:34 am
Posts: 2931
You can try this:

Code:
body->m_flags |= b2Body::e_sleepFlag;


Top
 Profile  
 
 Post subject: Re: set body to sleep?
PostPosted: Mon Mar 17, 2008 4:45 pm 
Offline
Site Admin

Joined: Thu Sep 06, 2007 12:34 am
Posts: 2931
Ok, so you don't want sleep. You want to cancel out gravity. Just apply a force to the center of mass before each time step: force = - mass * gravity.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC - 8 hours [ DST ]


Who is online

Users browsing this forum: Google [Bot] and 6 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group