Some questions :)

Topics: Developer Forum
Feb 17, 2010 at 9:36 PM

Hi !

First of all, thanks to the Farseer team, your engine is really cool . When i need something, Farseer do it :D

I develop a plateformer with some friends and it's our first game, and the first time we use physic engine.

I have 2 questions.

1) What is the difference between local position and world position ? Until now, i use only body.Position and geom.Position to set or get my game objects, i don't deal with "world position" and all work fine. World position should be use if game origin is not the same of simulator origin ? It's maybe a stupid question lol

2) We have problem with ground. We use tiles and where tiles are linked, the character bounce (character's geom bump with corner of the next ground tile). We try some tricks (start next tile before end of previous, play with y axis ... no way). Is there an other solution than wide tiles to make ground with 1 piece ?

Sorry for my bad English :)

Kévin

Coordinator
Feb 18, 2010 at 12:38 AM

1.

Local coordinates are coordinates where the body's position (centroid) is the center. Is is a coordinatesystem where (0,0) is at body.Position.
World coordinates are the coordinates in the normal coordinatesystem.

When you use Body.Position, you get the position in world coordinates.

2.

That is a known problem and really hard to fix without resorting to raycasting. You should create your ground of one big geometry instead of several smaller. Else you have to move your character a small amount above the floor using something like raycasting.

Feb 18, 2010 at 8:44 AM

Thanks for your answer genbox. I know what I have to do :)