FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

body stops reacting after xForm

 
Post new topic   Reply to topic     Forum Index -> Blaze
View previous topic :: View next topic  
Author Message
brianguertin



Joined: 26 Dec 2008
Posts: 8

PostPosted: Sun Jan 04, 2009 3:23 pm    Post subject: body stops reacting after xForm Reply with quote

Im trying to use xForm to just move a body from point A to B. If i try once, its position is moved to the new location, but it stops reacting to all gravity/collision. Further calls to xForm with different positions dont have any effect. I've tried waking up the body after the call just in case but that doesn't help;
Back to top
View user's profile Send private message
mike



Joined: 28 Dec 2008
Posts: 34

PostPosted: Sun Jan 04, 2009 5:26 pm    Post subject: Reply with quote

What exactly is xForm? I might be able to help but i have no idea what xForm is.
Back to top
View user's profile Send private message
brianguertin



Joined: 26 Dec 2008
Posts: 8

PostPosted: Sun Jan 04, 2009 9:10 pm    Post subject: oops Reply with quote

Sorry, i meant I'm setting the bodies position using the method Body.xForm.

body_.xForm(Vec2(0, 1), 0); // teleports the body to (0, 1)
Back to top
View user's profile Send private message
brianguertin



Joined: 26 Dec 2008
Posts: 8

PostPosted: Sun Jan 04, 2009 9:22 pm    Post subject: Reply with quote

ok upon further inspection, i noticed xForm always returns false which supposedly means the body is outside the world aabb. problem is, i see no mention of how im supposed to *set* the aabb... the World constructor only expects gravity and whether to sleep

new World(Vec2(0, 9.9Cool, true);

// but according to box2d i should be providing an AABB
auto aabb = new AABB;
aabb.lowerBound.set(-100, -100);
aabb.upperBound.set(100, 100);
new World(aabb, Vec2(0, 9.9Cool, true);

// but this doesnt work with blaze. what am i missing?
Back to top
View user's profile Send private message
brianguertin



Joined: 26 Dec 2008
Posts: 8

PostPosted: Sun Jan 04, 2009 10:26 pm    Post subject: Reply with quote

Idea ok, im not exactly sure what the logic is supposed to be in the xForm method, but i looked over it and it calls a function (Shape.synchronize) which always returns false. It then decides, if that function returns false, that it should freeze the body, therefore the body is frozen 100% of the time when calling xForm.

to work around this i juse commented out the part the whole part that says "if (freeze == true)", and associated logic so that it wont freeze the body anymore. my editor is looking good again Smile
Back to top
View user's profile Send private message
SirAlaran



Joined: 19 Feb 2007
Posts: 84
Location: Silicon Valley

PostPosted: Thu Jan 08, 2009 2:39 pm    Post subject: Reply with quote

brianguertin wrote:
Idea ok, im not exactly sure what the logic is supposed to be in the xForm method, but i looked over it and it calls a function (Shape.synchronize) which always returns false. It then decides, if that function returns false, that it should freeze the body, therefore the body is frozen 100% of the time when calling xForm.

to work around this i juse commented out the part the whole part that says "if (freeze == true)", and associated logic so that it wont freeze the body anymore. my editor is looking good again Smile


Hm. I'll have to try to track down Mason and ask him about that. I didn't write blaze (and honestly haven't had the time to look through it all) so I don't even know why synchronize is supposed to return a bool.

If something else explodes because of this, let me know. If you don't find any bugs caused by it I may just make those lines commented in svn.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic     Forum Index -> Blaze All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
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 vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group