Hi all, I am currently facing an issue with the LinearVelocity feature of Farseer. I have a enemy character in my 2d platform game. I wish to have a simple movement from the right to the left. I read through the discussion, and I managed to find a viable
way to implement it.
I used the following code:
body.LinearVelocity= endLocation * Time.deltaTime * 10;
The body of my character is set to Kinematic and it has the shape component is set to polygon. The above endLocation is the position of my player's character sitting at the left side of the screen. This piece of code had made the character moved. However,
not along the x-axis (my ground) that I intended it to be, it slowly moved downwards out of the screen.
I have tried setting the body to Dynamic, but the enemy character now topple over after walking a while.
I understand from Jerry, in his answer to another discussion that when one wishes to only move on the x-axis, just kill the velocity on y. But I'm not sure how to do it. Is there anyone with such experience or knowledge in how to do? I would appreciate any
advice or comments :D