About Store Forum Documentation Contact
Donations:
188$/mo



Post Reply 
convex phys object
Author Message
nero81af Offline
Member

Post: #1
convex phys object
hi there
I'm trying to load in game engine data from custom .phys file (convex shape around the mesh) the system crashes. probably the way I'm taking is wrong!

I'm building a mesh group from single mesh, than phys group from this newly created mesh group and finally load func.

anyway is there a simpler way to load a .phys file for my custom mesh?

P.s.
I've also found a bug in mesh group: if I call his empty constructor in init, then in shut his distructor without calling any method on it, the system crashes
03-29-2010 09:35 AM
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #2
RE: convex phys object
could you paste some codes which you're using?
have you initialized physics first?
03-29-2010 05:40 PM
Find all posts by this user Quote this message in a reply
nero81af Offline
Member

Post: #3
RE: convex phys object
mmm I'm calling constructor before initializing physics... but I call load method after
meshg->create(*this->p_mesh,VecI(1,1,1));
physg->load(p_physpath);
physg->create(*this->p_meshg);
act->create(this->p_physg->phys(0));

here's the code
(This post was last modified: 03-29-2010 10:02 PM by nero81af.)
03-29-2010 09:58 PM
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #4
RE: convex phys object
it doesnt make much sense if you load and then re-create the object
load, create

this->p_physg->phys(0)); // you're not checking here if the 0-th elements exists
03-29-2010 10:24 PM
Find all posts by this user Quote this message in a reply
nero81af Offline
Member

Post: #5
RE: convex phys object
I modified the code like you suggested but still got crashes.. after that I moved the constructors from preinit to init and everything worked well.. the empty constructor I moved are meshgroup physgroup and actor's one
03-29-2010 11:03 PM
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #6
RE: convex phys object
yes you can't do much in InitPre (please check comments on that function, the engine is not ready yet for more complex data processing)
this is before it initializes
03-29-2010 11:05 PM
Find all posts by this user Quote this message in a reply
nero81af Offline
Member

Post: #7
RE: convex phys object
omg I just found out.. my fault.. I had two constructors on my object.. and guess where I put the contructor? anyway thanks for your advices.. now I can load my actor ^^
03-29-2010 11:06 PM
Find all posts by this user Quote this message in a reply
Post Reply