C#/XNA port of the Box2D physics engine.

learn more… | top users | synonyms

0
votes
1answer
39 views

Creating a Player object in a physics engine

I have a working physics environment using Farseer - but how do I create a player object that can walk around? My current attempt involves applying forces to a rectangular body whenever keys are ...
0
votes
1answer
36 views

Creating unfilled circle shapes using Farseer

I have a project idea that I need to create a sphere and use it's interior for collision detection. I can only find information in Farseer that creates a filled circle. Is there a way to do it with ...
0
votes
1answer
29 views

How can I create a character design that maintains a fixed rotation body, while allowing the body's “arm” to rotate 180 degrees?

I am attempting to create a 2d shooter in Farseer Physics on the Xbox360. I have a player body which has a fixed rotation, as I do not want the body to rotate at all during gameplay. I am now looking ...
0
votes
1answer
162 views

Farseer: How can I create a body with a hole in the middle

I want to create a shape that looks like the black contour in this picture: The shape must be empty in the middle(white surface). The white surface must not be part of the shape, just the black ...
1
vote
1answer
885 views

Drawing Shape in DebugView (Farseer)

As the title says, I need to draw a shape/polygon in Farseer using debugview. I have this piece of code which converts a Texture to polygon: //load texture that will represent the tray ...
0
votes
0answers
8 views

Setting up collision groups in farseer

I'm trying to set up collision groups in Farseer so that the items in the picture collide as follows: G1 Collides with All. B1 and B2 collide with each other and G1, but not R1 or R2 R1 and R2 ...
2
votes
1answer
43 views

Why is BayazitDecomposer inaccessible when upgrading from Farseer 3.3.1 to Farseer 3.5?

I used the following code in Farseer 3.3.1 and it worked correctly, but in Farseer 3.5, I always get an error message in the following line: list = BayazitDecomposer.ConvexPartition(textureVertices); ...
1
vote
0answers
23 views

Is it possible to change the position of a Farseer joint tie point?

When I create a revolute joint in Farseer, then there is always a tie point in the center of each of the two bodies. Is it possible to change the position of a tie point? For example: I created a ...
2
votes
0answers
63 views

How can I combine multiple bodies into one in Farseer? [closed]

I want to create a windmill in Farseer, but I don't know how to combine the 3 windmill sails bodies to one body. During gameplay, the sails could get destroyed. For example, if another body hits one ...
0
votes
1answer
95 views

How can I move bodies in Farseer, using touch input?

The player should be able to move a Farseer body with it's fingers. How can I do that? What is the best way to create a Farseer body for the player's finger so that the player can move other Farseer ...
1
vote
1answer
31 views

How can I limit the movement angle of a Farseer joint?

How can I create rectangles in Farseer that behave like the two red rectangles in this video: https://www.youtube.com/watch?v=w0p2y4dRylQ I created an angle joint, but it behaves weird. Should I use ...
1
vote
1answer
70 views

How can I create a seesaw with Farseer Physics Engine?

I want to create a seesaw like in this picture: I created two rectangular bodies, one for the diagonal rectangle and one for the little rectangle in the middle. But I don't know how to connect the ...
3
votes
1answer
840 views

360+ degree rotation skips back to 0 degrees when using Math.Atan2(y, x)

I'm new to XNA and this is my first actual project, so forgive my noobness. I'm using jointAngle = System.Math.Atan2(RightStick.Y, RightStick.X); in order to set an angle of a joint (farseer) so ...
0
votes
0answers
83 views

Farseer: How can I break a body into multiple pieces?

I created a breakable body but the pieces are not flying around if the ball touches it. What is wrong? Why is the breakable body not breaking into pieces? I made a video and I enabled debugview, so ...
0
votes
2answers
170 views

Farseer: What can I do so that a body can move through a special kind of bodies?

I have three different kinds of rectangles. Black, white and blue rectangles. The rectangles are moving and can collide with each other. But with one exception, the blue rectangle can collide normally ...
13
votes
2answers
1k views

How can I create a bomb explosion in Farseer that pushes nearby objects away?

I'm trying to create a bomb explosion in Farseer. I created a circle for the bomb. However, if the bomb explodes, the objects (bodies) that are around it should fly away because they're pushed back by ...
3
votes
2answers
297 views

How can I determine the contact point of a collision?

I have two Farseer bodies. A static rectangle and a dynamic ball that is flying around. I want to determine where the ball touched the rectangle. I need the exact coordinates of the contact point. ...
1
vote
1answer
83 views

Height and width of a Farseer body?

I have a body named PersonA. If PersonA collides with another body, the width and height of that body should be saved. I tried it like this but I always get error messages that "Width" and "Height" ...
1
vote
1answer
82 views

How to apply steering to a physics body correctly when using a physics engine?

I have a top down 2d game that uses a physics engine (Farseer). I'm using the standard steering behaviors to make the AI move around but I'm not sure the correct way to take the so called "steering ...
0
votes
1answer
335 views

How does Raycasting work in XNA Farseer and player collision?

Wanting to know how to figure out if player's bottom is colliding with object so that I could allow the player to jump. I was trying to use OnCollision but was referred to ray-casting, I looked ...
0
votes
0answers
36 views

How can I measure the weight in Farseer?

I have two different objects(star and rectangle) and I want to measure the entire weight that lies on the balance. How can I do that? Is it possible to know the entire weight that presses on the ...
1
vote
2answers
222 views

XNA : Character walking on tiles and getting stuck

I develop games for my own pleasure and also to share experiences with my kids learning coding. Lately I have been working on a classic retro platform game using XNA and Farseer. One issue I am ...
0
votes
0answers
112 views

Farseer Player Movement and Collision

I have added a video link for any one who whats to see what the problems are by watching the game. I am trying to create a player movement system and there are small problems that I am running into. ...
1
vote
1answer
238 views

Player Movement Systems

I am working on a project were in class my group of students help produce a video game. We are creating a 2D platformer and was trying to make a pixel based system collision witch fell through. Now I ...
0
votes
1answer
124 views

How long will it take to jump from point A to point B?

I need to know how long it takes to jump from one point to another. Because if the jump time takes for example 2.0f(float jumptime = 2.0f), a jump animation is played during a time interval of exactly ...
0
votes
0answers
32 views

Farseer Physics, mass affecting velocity

I have just started with Farseer Physics, so I am kind of a newbie in this theme, so not a surprise that I have encountered something that is not involved by the engine, or I just don't know about it. ...
0
votes
0answers
94 views

Farseer for platformer - (Almost) constant velocity

I am building the prototype for a platformer and would like to use farseer physics engine. I got the feedback that it might not be a good idea to use physics engine, but I would like to have elements ...
1
vote
1answer
49 views

A Sensor’s ContactList Keeps Old / Ignores New Contacts, When That Contact Is still

Okay this is a hard one to explain so I’ll try my best. Basically every time my enemy class updates, it runs a SightCone Sensor Contact List test, so this is every single frame it checks for all the ...
0
votes
1answer
111 views

Farseer: How can I calculate the needed velocity in this case?

I have two platforms and one ball. The ball should fly from the red platform to the blue platform. The ball should land somewhere in the purple rectangle of the blue platform. How can I know how ...
0
votes
2answers
62 views

Attaching a Body to another, without the new body impacting the physics of the first in ANY WAY

Basically I want to add a vision / sight cone to an enemy body, So I have the sight cone body, and enemy body, but every joint or weld I have tried so far has caused the sight cone to severely ...
3
votes
1answer
144 views

Cant get a Farseer Physics body’s rotation to follow the mouse

Here is what’s in my HandleKeyboard() method that is called from the Game1 Update method. MouseState mState = Mouse.GetState(); // the Vector2 that will hold the angle from the player ...
2
votes
3answers
604 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. ...
1
vote
1answer
64 views

How can I measure the velocity of a Farseer body?

I want to know how fast my body(a circle) is moving. How can I do that? How can I measure the velocity of a body? In addition, I want to limit the velocity of a body. For example, I want that a body ...
0
votes
1answer
62 views

Farseer Circle Body Problems, Please help!

I have created a circle body class, but in game my player body just passes through it. the circle will not move, only rotate. however when i create the circle body just straight up, raw in the game1 ...
1
vote
1answer
89 views

Farseer - Difference between Position, GetLocalVector, and GetWorldVector

I have used Box2D extensively, and am used to just calling body.GetPosition(). But Farseer does not have this. Instead it has a property Position, as well as methods GetLocalVector and GetWorldVector. ...
1
vote
0answers
54 views

Changing the position of a Gravity Controller - Farseer

I'm trying to create mini black holes for my XNA game using farseer physics. Problem is I can not get the gravity source to stick to the Body I've attached it to, as it scrolls across the screen, the ...
8
votes
3answers
947 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 ...
0
votes
0answers
104 views

Body is pushed back from the wall sometimes

I have a strange issue with the collision between the wall and my player. If I press W and D or W and A to move up and right respectively up and left, the player sometimes gets pushed back from the ...
2
votes
2answers
442 views

Farseer Physics: How to create shape from Vertices?

As you can understand from the title, I'm pretty new to game development. I'm doing this for fun. Anyway here's my question. I have this Farseer Physics samples and i've been studying them for a few ...
2
votes
1answer
166 views

Getting a uint color array from a portion of a Texture2D

I'm currently using the Farseer tools to create a body from a Texture2D. However, my texture is a spritesheet and I need to get the uint array containing the colors from a portion of the full ...
1
vote
0answers
88 views

Farseer: Cutting body from texture

Is it possible to cut a body from a texture in Farseer 3.0? I have a texture converted to a body with multiple fixtures ( using BayazitDecomposer, CreatePolygon method, ..) and can even do it as a ...
-1
votes
1answer
419 views

Why is Farseer not working in Windows Phone 7/8?

I created a new Windows Phone Game (4.0) project in Visual Studio Express 2012 and added the Farseer project to the solution explorer. But adding a reference to the Farseer project is not working. I ...
2
votes
1answer
143 views

Farseer: Shooting a ball in a certain angle?

How can I shoot a ball in a certain angle? When I press the Space key, the ball should be shot in a 45 degree angle. How can I do that?
0
votes
0answers
217 views

Farseer: Difficulties with implementation of DebugView

I added the project "Farseer Physics Engine 3.3.1 HelloWorld XNA\DebugView XNA\DebugView XNA.csproj" to my solution explorer in Visual Studio. In addition, I added a reference to my project and the ...
0
votes
1answer
71 views

Farseer: RemoveBody is not working [closed]

I want to remove bodies after they touched the character(playerrect). But the bodies get not removed. I set a breakpoint in the following line but it doesn't get yellow: ...
1
vote
1answer
137 views

Farseer: How can I remove a body?

I have many sensors(coins) in each level and I want to remove the sensors(coins) when the player rectangle(Mario) touches them. I check in OnCollision if Mario touches a coin, if he touches it, it ...
0
votes
1answer
51 views

Farseer: Difficulties with ContactListener

How can I register the ContactListener in XNA? In the box2d manual is written: 9.4 Contact Listener ... At run-time you can create an instance of the listener and register it with ...
4
votes
1answer
195 views

How do I make a tile passable in one direction only?

I want that my character can jump through some of the tiles, like Mario does in this video: http://www.youtube.com/watch?v=zIPYzbNrNhc In this video, Mario jumps up through orange platforms, but ...
-3
votes
1answer
324 views

Farseer: are you missing a using directive or an assembly reference?

I want to create a polygon in Farseer. I found an example in the documentation but it's not working because I get this error message: The type or namespace name 'Vertices' could not be found (are you ...
0
votes
1answer
105 views

Farseer: Ball is not getting slower

The ball is not getting slower when it rolls over a straight platform. I added friction but that changed nothing, the ball still gets not slower. I want that the ball gets slower and slower and stops ...