Jump to content

  • Log In with Google      Sign In   
  • Create Account


oenda

Member Since 05 May 2013
Offline Last Active Jun 03 2014 05:51 PM

Posts I've Made

In Topic: Character Rotation While Moving

16 May 2014 - 04:20 AM

thanks again.It didn't help.Probably,I will change the game to 3d from 2d.I will use Bullet Physics.


In Topic: Character Rotation While Moving

15 May 2014 - 01:52 PM

Thank you ,ferrous.I want something like a car.The character must move where it faces.But i don't know how to do this.


In Topic: Character Rotation While Moving

15 May 2014 - 05:50 AM

Thanks.I increased the value.But it spins at its orbit.And If I don't do something like this ,it doesn't move left/right

    if(sf::Keyboard::isKeyPressed(sf::Keyboard::Left)){

       body->ApplyLinearImpulse(b2Vec2(-speed * UNRATIO,0),body->GetWorldCenter(),true);
       body->ApplyTorque(100* UNRATIO,true);

    }

If I don't use  body->ApplyLinearImpulse ,it doesn't move left or right

 

Is there any solution?


In Topic: Character Rotation While Moving

14 May 2014 - 02:39 PM

thanks for the answer.I tried but it didn't work.

if(sf::Keyboard::isKeyPressed(sf::Keyboard::Left)){
body->ApplyTorque(5* UNRATIO,true);
}

if(sf::Keyboard::isKeyPressed(sf::Keyboard::Right)){
body->ApplyTorque(-5* UNRATIO,true);
}

In Topic: Terrain or 3d model with physics?

04 March 2014 - 03:33 AM

Thanks for all replies


PARTNERS