Box2D Forums

It is currently Tue May 21, 2013 1:15 am

All times are UTC - 8 hours [ DST ]




Post new topic Reply to topic  [ 3 posts ] 
Author Message
PostPosted: Fri Apr 13, 2012 7:35 am 
Offline

Joined: Tue Jul 12, 2011 1:39 am
Posts: 15
Hi,

when deriving b2contactlistener, I can not make any "physics" logic inside those callback, because I can not modify the world. User manual says to make a deep copy of incoming stuff and perform action after physics step. But how exactly can I make a deep copy of incoming b2Contact* when b2Contact is an abstract class and can not be instantiated?

Thank you very much


Top
 Profile  
 
PostPosted: Fri Apr 13, 2012 10:57 am 
Offline
Site Admin

Joined: Thu Sep 06, 2007 12:34 am
Posts: 2931
No, just make a copy of the data you need. You game object ids, contact points, normals, impulses, etc.


Top
 Profile  
 
PostPosted: Fri Apr 13, 2012 12:06 pm 
Offline

Joined: Tue Jul 12, 2011 1:39 am
Posts: 15
Thank you very much Erin!


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

All times are UTC - 8 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 4 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