Ok, so I hope this will not be a very dumb question since I do not want to waste all of your time, so here goes nothing.
Using: SpriteBuilder, cocos2d, chipmunk2d, objective C
I'm creating an endless scroller and it use these 2 lines of code to move the player and the camera:
// moves the player to the right
player1.position = ccp(player1.position.x + delta * scrollSpeed, player1.position.y);
// move the camera with the player
physicsNode1.position = ccp(physicsNode1.position.x - (scrollSpeed *delta), physicsNode1.position.y);
The standard spot for the player's x coordinate is 150 in points.
Whenever the player has jumped upon an obstacle and lands back on the ground, the player's position change with about 0.2 points, so from 150 -> 149.79999, and after the next obstacle 149.7777 etc. etc.
Now I guess this is because of the change in velocity during air time whenever the player jumps from the obstacle and back to the ground.
I have looked around but I am not able to find how to NSLog the player current velocity.
So my question(s) is/are, how do you check the player velocity, and do you guys/girls think my problem is due to a change in velocity, if not, then what is the problem and is there is viable solution?
Sorry for the many question, I just started using cocos2d and chipmunk2d, and I have never worked with physics before.