Search Results

Search found 2 results on 1 pages for 'arnas'.

Page 1/1 | 1 

  • box2d and constant movement

    - by Arnas
    i'm developing a game with a top down view, the players body is a circle. To move the character you need to tap on the screen and it moves to the spot. To achieve this i'm saving the coordinate of the touch and call a method every frame which applies linear velocity to the body with a vector of the direction the body should go _body->SetLinearVelocity(b2Vec2((a.x - currPos.x)/SPEED_RATIO,(size.height - a.y - currPos.y)/SPEED_RATIO)); //click position - current position, screen height - click position (since the y axis is flipped, (0,0) is in the bottom left ) - current position = vector of the direction we want to go now the problem with this is that the body slows down until it finally stops when getting closer to the point we want it to go, since the closer we are to that point the lenght of the vector gets smaller. Besides that i've read that it's bad practice to set linear velocity in box2d and i should use apply force instead, but that way the forces would add up and overshoot the target where it's supposed to stop. So what i'm asking is how to move a box2d body to a coordinate in constant speed.

    Read the article

  • A problem with installing skype

    - by Arnas
    I recently got a 9,04 version of ubuntu and for the past day i was trying to install skype ( sounds funny i know ) and when I write 'sudo apt-get install skype' I get this error in the terminal The following packages have unmet dependencies: skype: Depends: libqt4-dbus (>= 4.4.3) but 4.4.0-1ubuntu5~hardy1 is to be installed Depends: libqt4-network (>= 4.4.3) but 4.4.0-1ubuntu5~hardy1 is to be installed Depends: libqtcore4 (>= 4.4.3) but 4.4.0-1ubuntu5~hardy1 is to be installed Depends: libqtgui4 (>= 4.4.3) but it is not installable How could I fix this problem? THanks

    Read the article

1