C#/XNA port of the Box2D physics engine.

learn more… | top users | synonyms

2
votes
1answer
323 views

Implementing a wheeled character controller

I'm trying to implement Boxycraft's character controller in XNA (with Farseer), as Bryan Dysmas did (minus the jumping part, yet). My current implementation seems to sometimes glitch in between two ...
5
votes
1answer
1k views

Correct way to use Farseer Physics in XNA

I am using Farseer Physics for my 2D sidescroller game and I'm not sure how to proceed with it. I currently have a Sprite class (handles nothing but graphics), a GameObject class (contains specific ...
6
votes
1answer
612 views

Farseer Physics: Ways to create a Body?

I want to create something similar to this using farsser and Kinect: https://vimeo.com/33500649 This is my implementation until now: http://www.youtube.com/watch?v=GlIvJRhco4U I have the outline ...
0
votes
0answers
137 views

Farseer non-colliding bodies affect eachother

I'm trying to use Farseer to make a tile engine, but bodies that are not colliding with a sprite are still having an effect on it. In this image there is a single sprite(the green box) and a single ...
1
vote
2answers
282 views

Building a shape out of two rectangles

I would like to build a body with Farseer out of two rectangles so it looks like this: I am a real beginner, so please describe it carefully. Thanks in advance!
2
votes
2answers
665 views

Farseer: Only allow the collision one time with the object

I have there serveral platforms. I would like to allow the player to collide only one time with the object! Hope you can help me
0
votes
1answer
495 views

Building a shape out of an Texture with Farseer

I have already looked at the Documentation on there Website, but the code provieded to create a shape out of an Texture is outdated for the newest version. The body is very simple so maybe i can do it ...
0
votes
1answer
332 views

Multiplayer Game Data Serialization Problems

I want to create a simple game that can be played with one to two player. I plan on using TCP sockets, Farseer Physics, XNA, a BinaryFormater and a Memorystream. as far as i know i can't do the ...
1
vote
2answers
875 views

How do I determine which side of the player has collided with an object?

I have some static bodies (platforms) and a dynamic body (the player) in my world. The collision between them works great, but I would like to know which side of the player (rectangle) collides with ...
-2
votes
1answer
336 views

Fix my Farseer collision detection code

The collision is not working correctly! The collision is in the "open-word" and not when it collides! Here my code: Platform code(static): body = BodyFactory.CreateRectangle(world, ...
0
votes
1answer
327 views

Farseer: ApplyForce problem

I just tried Farseer and everything is working great. My problem is, that on touch the player should get an force up. Although the touch event works well, the player did not get an force! Here my ...
2
votes
1answer
461 views

Odd offset bug in Farseer/XNA/C#

So I'm using Farseer to create an immovable object: [...] private Body body; public Immovable(World world, ContentManager c, String s, int posx, int posy, int w, int h, String user_data) { ...
1
vote
1answer
2k views

How do I reset a game level

I have managed to implement a screen state system which I use to access the game. When the the character has collided with an enemy tile the game ends by going to a seperate game over screen. After ...
1
vote
0answers
159 views

Farseer Physics EndContact events don't fire for all registered delegates

Here's my situation: I have several objects that contain a body and a fixture. They are set to sensor = true; atmosphere = BodyFactory.CreateCircle(world, atmosphereRadius / Level.METER_IN_PIXELS, ...
0
votes
1answer
124 views

InvalidCastException in Farseer's raycasting when trying to use the built-in explosion class?

I'm trying to create an explosion at the point that two entities collide, but whenever explosion.Activate() is called, it causes an InvalidCastException to be thrown in Raycast(), on the line that ...
1
vote
1answer
170 views

How to pin a body in case of collision in Box2D or Farseer?

I'm trying to get an understanding for the Box2D/Farseer physics engine by implementing a small air hockey simulation. There, I have the problem that the CPU player attacks the puck, kicks it, but ...
2
votes
1answer
2k views

Farseer Physics collision detection vs intersection detection with sensors

I'm trying to make a game that uses Farseer physics engine as its main collision detection engine. I have a 2d circle body object that has a matching fixture (I used the CreatCircle method. I did not ...
1
vote
0answers
225 views

Unusual Farseer Behaviour?

My basic implementation of a Farseer world has been behaving very strangely. It seems as though there is a very low maximum velocity, and collisions result in the small spheres involved clipping ...
1
vote
3answers
878 views

Unable to find good parameters for behavior of a puck in Farseer

EDIT: I have tried all kinds of variations now. The last one was to adjust the linear velocity in each step: newVel = oldVel * 0.9f - all of this including your proposals kind of work, however in the ...
1
vote
1answer
676 views

Farseer DebugViewXNA: scaling problem

I'm trying to get into Farseer and XNA. Before I do any real graphics, I want to use the Farseer debug view only. The problem ist, that I don't really know which matrix to use and the other thing is ...
4
votes
3answers
630 views

IndexOutOfRangeException on World.Step after enabling/disabling a Farseer physics body?

Earlier, I posted a question asking how to swap fixtures on the fly in a 2D side-scroller using Farseer Physics Engine. The ultimate goal being that the player's physical body changes when the player ...
5
votes
3answers
885 views

Can I swap out Farseer physics fixtures at runtime?

I am working on a 2D side-scroller using Farseer Physics Engine v3.3.1. In order to create a realistic physical skeleton for the player, I am using a method similar to the one explained here (See ...
1
vote
2answers
580 views

How can I implement a “boost pad” with Farseer/Box2D physics?

I'm trying to implement a boost pad in my XNA game using the Farseer Physics Engine. (This question applies to Box2D too, I would be happy to port working Box2D code to C#.) By "boost pad", I mean an ...
4
votes
1answer
432 views

Making a multi-pieced rectangular breakable body with Farseer

Using Farseer 3.3.1 I want to create a rectangular BreakableBody with many pieces. Right now here is my code: Vertices polygon = PolygonTools.CreateRectangle( 2.5f , 1.25f ); List<Vertices> ...
6
votes
2answers
1k views

How to create a very specific kind of joint in Farseer?

Edit Problem solved (see Drackir's answer). Here's a demo of what I was trying to achieve with this joint. More info about the scenario on this other question. Problem I'm trying to create a ...
2
votes
3answers
533 views

How do you change a Body's origin in Farseer?

In Farseer 3.3.1 for XNA, how do I change the origin of a Body? For example, when I create a Circle Body, instead of it rotating around its center, I want it to rotate around another specified point. ...
8
votes
3answers
2k views

How do you do AI path following within a 2d physics engine like farseer/box2d?

I'm in the process of moving a 2d top down game I've been working on into a proper rigid body physics engine like Farseer. Up until now, I had just hacked together my own physics code where needed. ...
0
votes
2answers
526 views

Box2D/Farseer Collision Detection

I am looking for literature - or a simple explanation - on how the Farseer (and for that reason, the Box2D) collision detection system works - specifically the logic that comes after the broadphase ...
8
votes
5answers
566 views

What should I do to prevent my monsters from walking off platforms?

I have a question that is driving me crazy because I think it should be fairly easy to find a tutorial on it. I'm currently using XNA and Farseer to create a simple platformer game. I'm about to be ...
1
vote
1answer
649 views

Box2d/Farseer how to use the World object?

this question is primarily about farseer but as it is a wrapper around box2d i think it's relevant for both libraries. I'm in the beginning of developing a simple platform game, and I'm stuck as to ...
4
votes
1answer
550 views

Farseer engine built for MonoTouch?

Does anyone know where I can find a version of the farseer physics engine compiled for MonoTouch, or do most people just download a windows version from codeplex and attempt to build their own ...
8
votes
3answers
903 views

Tiling Physics using Farseer

I'm having a problem with the Farseer Physics Engine, where in a tiled environment, my object will at times interact with corners of others objects, even if they align perfectly. I've read about ...
1
vote
2answers
2k views

Create a body of an irregular 2D sprite in Farseer

I'm trying to create a body of a irregular 2D sprite Farseer 3.3.1. The regular shapes that BodyFactory provides are not that I want. Is there a way that one can create irregular objects? Could it be ...
0
votes
1answer
378 views

Bouncing effect in Farseer WP7

I'm not quite sure what I need to do, but I have a ball falling from the sky and it needs to bounce when it hits an object. Do I configure the ball in some way or do I need to setup a spring object or ...
1
vote
1answer
542 views

What's the difference with how Box2D and Farseer behave in terms of collisions?

I've ported my engine to iOS and have been using the C++ version of Box2D. Everything runs fine except on collisions, it seems Box2D and Farseer handle collisions somewhat differently. Anyone know ...
5
votes
2answers
548 views

Detect Open Space in Farseer [duplicate]

Possible Duplicate: How do I detect ledges? I'm working on a 2D platformer using XNA and Farseer. I would like the player's character to be able to grab and climb up ledges. Detecting a ...
4
votes
1answer
519 views

Issues with Polygon Fixtures in Farseer

I've been working with the Farseer Physics Engine to try and build a simple 2D, sidescrolling game. Creating basic rectangle blocks worked easily enough, but I discovered when I tried to create some ...
8
votes
3answers
829 views

Inverted textures

I'm trying to draw textures aligned with this physics body whose coordinate system's origin is at the center of the screen. (XNA)Spritebatch has its default origin set to top-left corner. I got the ...
3
votes
1answer
514 views

How to restrict paddle movement using Farseer Physics engine 3.2

I am new to using Farseer Physics Engine 3.2(FPE), so please bear with my questions. Also, since FPE 3.2 is based on Box2D, I have been reading Box2D manual and pieces of code scattered in samples to ...
2
votes
2answers
1k views

Farseer - Apply Impulse

I'm new to Farseer and have a simple question. The demos I went through didn't seem to demonstrate what I want. I would like to apply an impulse (not force) to an object at a specific position on that ...
1
vote
1answer
439 views

Farseer: what are its performance on xbox360?

Are there any performance issue related with lots of "new" calls and things like that? Did anyone test it? Something to take care of? Thanks
8
votes
2answers
1k views

How to implement 2d explosions that will cause damage taking into account covers and distance?

How can I implement a 2D explosion in a way that it will cause less damage to characters that hide behind crates or other cover? Ideally damage will depend on the strength of the cover (e.g. metal ...
9
votes
3answers
386 views

Why does Farseer 2.x store temporaries as members and not on the stack? (.NET)

UPDATE: This question refers to Farseer 2.x. The newer 3.x doesn't seem to do this. I'm using Farseer Physics Engine quite extensively at the moment, and I've noticed that it seems to store a lot of ...
25
votes
6answers
3k views

Implementing a wrapping wire (like the Worms Ninja Rope) in a 2D physics engine

I've been trying out some rope-physics recently, and I've found that the "standard" solution - making a rope from a series of objects strung together with springs or joints - is unsatisfying. ...