Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3496698
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T12:16:52+00:00 2026-05-18T12:16:52+00:00

i am using box2d to developed iphone game.But i have not a lot of

  • 0

i am using box2d to developed iphone game.But i have not a lot of experience.I move a body to a location using this code

body->SetTransform(b2Vec2(posx2,posy2), 0);

and the body does move.But i need it to move with animation.in objective c i use UIView Animation to do similar type of things. can anyone tell how it possible in cocos2d box2d??

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-18T12:16:52+00:00Added an answer on May 18, 2026 at 12:16 pm

    This the way i did this…..

    switch of the default tick method using /…/
    and move the body manually…

    b->SetTransform(b2Vec2(posx1, posy1), 0);
    id action = [CCMoveTo actionWithDuration:0.4 position:CGPointMake( b->GetPosition().x * PTM_RATIO, b->GetPosition().y * PTM_RATIO)];
    [sprite runAction:action];
    

    another way:

    don’t comment off the tick….and inside tick instead of these:

    myActor.position = CGPointMake( b->GetPosition().x * PTM_RATIO, b->GetPosition().y * PTM_RATIO);
                myActor.rotation = -1 * CC_RADIANS_TO_DEGREES(b->GetAngle());
    

    you can reset position with animation as like the above….

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using Box2d and Cocos2d to develop an iPhone game. I have a
I am writing an iphone game using cocos2d and box2d engines. I have a
I'm using AndEngine/Box2d to develop a game. I have a ball that bounces around
I'm using Box2d for a game, and I have a bug that's driving me
I'm developing a physics game using AndEngine with box2d physics engine. I have a
I am using the cocos2d-iphone + Box2d engine, I have a simple call in
I'm using Box2d for a Bike Physics Game, Box2d lets you have fixtures that
I'm using AndEngine and Box2d to develop a game. I'm applying a force to
I am using Box2d for a topdown game. The ground is a series of
Salut, I'm currently working on a pool game in flash, using box2d for physics

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.