Making body(box2d) a spite(andengine) in android

  ... the case you feel the need for a new feature or want to submit one.

Making body(box2d) a spite(andengine) in android

Postby immyth » Tue Apr 24, 2012 1:19 pm

I can't make body(box2d) a spite(andengine) and at the same time i wanna apply MoveModifier to sprite which is body.if i can make just body,it works namely the srites can collide.if i can apply just MoveModifier to sprites,the sprites can move where i want.but i wanna make body(they can collide) and apply MoveModifier(they can move where i want) at the same time.How can i do? this my code just run MoveModifier not as body at the same time.
Syntax: [ Download ] [ Hide ]
Using java Syntax Highlighting
  1.  circles[i] = new Sprite(startX, startY, textRegCircle[i]);
  2.         body[i] = PhysicsFactory.createCircleBody(physicsWorld, circles[i], BodyType.DynamicBody, FIXTURE_DEF);
  3.         physicsWorld.registerPhysicsConnector(new PhysicsConnector(circles[i], body[i], true, true));
  4.         circles[i].registerEntityModifier(
  5.                 (IEntityModifier) new SequenceEntityModifier (
  6.                             new MoveModifier(10.0f, circles[i].getX(),  circles[i].getX(),
  7.                                     circles[i].getY(),CAMERA_HEIGHT+64.0f)));
  8.         scene.getLastChild().attachChild(circles[i]);
  9.         scene.registerUpdateHandler(physicsWorld);
Parsed in 0.021 seconds, using GeSHi
Google Play:

Download and Rate to Support, please...
Posts: 109
Joined: Wed Apr 04, 2012 1:07 am

Re: Making body(box2d) a spite(andengine) in android

Postby OzLark » Tue Apr 24, 2012 1:32 pm

Hi, Check this reply and thread: gles2/collide-against-sprite-on-path-t7669-10.html#p33653

Also, one post would have been enough - no need to cross post.

Did this post help you? Feel free to return the gesture by downloading Ninja Bees, creating a level (or more) and sharing it to the Ninja Bees website!

Ninja Bees - Our latest Android game, check it out on Google Play (free) or paid with no ads
Posts: 1130
Joined: Sun Feb 05, 2012 3:19 am

Return to Features

Who is online

Users browsing this forum: No registered users and 9 guests