Maintain Joints in the world

  ... discussions about development with the GLES1 branch of AndEngine.

Maintain Joints in the world

Postby ramesh465 » Wed Mar 07, 2012 7:57 am

When i am hitting(canonball) to a boby, ball should be attached to it and both the bodies are dynamic.
but it's closing not showing any crash or bug.
i created two bodies and my joint code is this..

revoluteJointDef = new RevoluteJointDef();
revoluteJointDef.initialize(baseBody, handleBody, baseBody.getWorldCenter());
revoluteJointDef.collideConnected = true;
mPhysicsWorld.createJoint(revoluteJointDef);

plz give any help...
Last edited by ramesh465 on Fri Mar 09, 2012 6:44 am, edited 1 time in total.
ramesh465
 
Posts: 31
Joined: Sat Dec 24, 2011 2:25 pm

Re: Maintain Joints in the world

Postby RealMayo » Wed Mar 07, 2012 6:15 pm

I don't understand.
You say what should happen. But you don't say what the problem is.
User avatar
RealMayo
 
Posts: 1682
Joined: Sat Sep 03, 2011 9:25 pm
Location: Chicago, IL

Re: Maintain Joints in the world

Postby ramesh465 » Fri Mar 09, 2012 7:19 am

RealMayo wrote:I don't understand.
You say what should happen. But you don't say what the problem is.



ohh sry "RealMayo" i updated just little see above...
ramesh465
 
Posts: 31
Joined: Sat Dec 24, 2011 2:25 pm

Re: Maintain Joints in the world

Postby RealMayo » Fri Mar 09, 2012 4:50 pm

You need to create the new joint in the update thread...
Syntax: [ Download ] [ Hide ]
Using java Syntax Highlighting
  1. this.runOnUpdateThread(new Runnable(){
  2.          @Override
  3.          public void run() {
  4.              // DO SOMETHING
  5.          }
  6. });
  7.  
Parsed in 0.031 seconds, using GeSHi 1.0.8.4
User avatar
RealMayo
 
Posts: 1682
Joined: Sat Sep 03, 2011 9:25 pm
Location: Chicago, IL


Return to GLES1

Who is online

Users browsing this forum: Alexa [Bot], darlidooi, Exabot [Bot], laclan and 22 guests