Box2D Forums

It is currently Sat May 25, 2013 7:23 am

All times are UTC - 8 hours [ DST ]




Post new topic Reply to topic  [ 5 posts ] 
Author Message
PostPosted: Thu Jun 09, 2011 7:25 am 
Offline

Joined: Thu Jun 09, 2011 7:22 am
Posts: 2
Hi,

I want to draw the connector of two joints behind the bodyshapes and not in front of them as it is the default.
The problem here is that the connector movieclip is simply added to the world (world.addChild(connector) ).
Is there any simple solution?


Top
 Profile  
 
PostPosted: Thu Jun 09, 2011 10:02 pm 
Offline

Joined: Mon May 23, 2011 9:41 am
Posts: 18
Just add after the world.addChild(connector)
Code:
world.setChildIndex(connector, 0);


Top
 Profile  
 
PostPosted: Fri Jun 10, 2011 1:30 am 
Offline

Joined: Thu Jun 09, 2011 7:22 am
Posts: 2
I have now overridden this method of the Joint class with my own Class
with world.addChildAt(connector, 0).

I thought maybe there is a component setting for this, but there wasn't.
Would be nice though to have somewhat more control over the index of the connector directly in WCK.
E.g. add at top, at bottom, before target, behind target, before bodyshape, behind bodyshape, etc.


Top
 Profile  
 
PostPosted: Sat Jun 11, 2011 10:18 am 
Offline

Joined: Sun Dec 12, 2010 9:56 am
Posts: 49
I'd like to see that added too.
Mayo, if you see this, please add what foobar mentioned above if you have the time :)


Top
 Profile  
 
PostPosted: Sun Jun 12, 2011 6:10 am 
Offline

Joined: Fri Dec 14, 2007 8:07 pm
Posts: 913
I've been planning on adding this for a long time actually, so yeah it'll make it in.


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

All times are UTC - 8 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


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