Questions tagged [farseer-physics-engine]

C#/XNA port of the Box2D physics engine.

Filter by
Sorted by
Tagged with
2 votes
1 answer
71 views

Turn a spaceship at a max rate

Using the following to turn a spaceship in a C# FarseerPhysics simulation. var turnPower = _Inventory.EngineTurnPower * time; body.ApplyTorque(turnPower); If ...
JensB's user avatar
  • 253
0 votes
1 answer
129 views

How can I get the position of a fixture in Farseer Physics 3.5?

I created a body(rectangle). After that, I attached a circle shape to the body. I need the position(world coodinates) of the circle shape because I want to draw a circle sprite(Texture2D) on that ...
John B.'s user avatar
0 votes
0 answers
245 views

Why does the order of Farseer collision categories affect collisions?

I've discovered a bizarre issue with the Farseer Physics Engine that I can't figure out. I have two Farseer bodies that I'd like to only collide with each other. To that end, I have the following code....
Grimelios's user avatar
  • 559
1 vote
0 answers
37 views

Defining collision rules in Farseer XNA

I'm trying to integrate Farseer into my XNA game. Since I'm using an EntityComponentSystem approach, I've added the Body inside a component and added it to the players' components. One thing I'm ...
Giora Guttsait's user avatar
1 vote
0 answers
140 views

Farseer Engine Texture To Polygon Center of mass bug

I am new to Farseer Engine used with MonoGame so I decided to do some test with the API to see the results and learn. If I understand, in Farseer the Position property of a Body object is located at ...
Marc-Antoine Jacob's user avatar
2 votes
0 answers
115 views

No collision with CompoundPolygon Monogame/Farseer

I want to create a body based on its texture. But the body I created just falls through the floor instead of colliding and resting on it. My Code: ...
Rilton's user avatar
  • 21
0 votes
0 answers
68 views

Position is not what it should be when attaching fixture

In XNA / Farseer I have something like this: ...
user2737037's user avatar
2 votes
1 answer
381 views

Drawing Farseer Fixtures

Is there any way how to draw a Polygon / Fixture from Farseer Physics with XNA? As I deform these polygons at runtime I can't ...
user2737037's user avatar
2 votes
4 answers
780 views

Check if body is on the ground

In my game I have an quite irregular terrain at the bottom and a round ball which can be controlled by the keyboard. Is there any way to check, if the ball is currently on the terrain? This is very ...
user2737037's user avatar
2 votes
1 answer
680 views

Using Farseer Physics, how can I get objects to bounce at the correct angle

I am using the Farseer Physics engine in my MonoGame project. I have static walls which have "body" friction 0 and "body" restitution 1. I have dynamic objects, which are circles, with "body" friction ...
sdgfsdh's user avatar
  • 275
0 votes
0 answers
116 views

Which Box2D-like physics engine parameters need pixel conversion?

The official guide does not have any useful details on the matter: http://www.box2d.org/manual.html Position is an obvious one. What about velocity? Density? Anything else? Update: the context is ...
Den's user avatar
  • 1,208
1 vote
0 answers
170 views

Farseer: Friend/Foe Collision - cannot push foes but friends

we are using Farseer in our project and I try to find a setup to achieve the following quite complicated collision behavior: Friendly Units can push each other aside. However, the push should be a "...
Imi's user avatar
  • 1,134
1 vote
0 answers
201 views

Farseer physics engine: save world simulation and load at a later time

I have created a windows desktop game using monogame and the Velcro (formermy Farseer) Physics engine (Velcro Physics). In this game I would like to the user to be able to save the game and continue ...
JensB's user avatar
  • 253
0 votes
1 answer
226 views

Creating a Player object in a physics engine [duplicate]

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 ...
mcmonkey4eva's user avatar
0 votes
1 answer
182 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 ...
Feek's user avatar
  • 101
0 votes
1 answer
558 views

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 ...
Homer_Simpson's user avatar
1 vote
0 answers
71 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 ...
Homer_Simpson's user avatar
2 votes
0 answers
145 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 ...
Homer_Simpson's user avatar
0 votes
1 answer
527 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 ...
Homer_Simpson's user avatar
1 vote
1 answer
436 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 ...
Homer_Simpson's user avatar
1 vote
1 answer
294 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 ...
Homer_Simpson's user avatar
2 votes
1 answer
124 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: ...
Homer_Simpson's user avatar
2 votes
1 answer
150 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 ...
Drego's user avatar
  • 21
0 votes
0 answers
232 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 ...
Homer_Simpson's user avatar
0 votes
2 answers
305 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 ...
Homer_Simpson's user avatar
3 votes
2 answers
1k 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. ...
Homer_Simpson's user avatar
1 vote
1 answer
690 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" ...
Homer_Simpson's user avatar
14 votes
2 answers
2k 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 ...
Homer_Simpson's user avatar
1 vote
1 answer
384 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 ...
TerryB's user avatar
  • 1,273
0 votes
1 answer
3k 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 ...
Ryan Foy's user avatar
0 votes
0 answers
52 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 ...
Homer_Simpson's user avatar
0 votes
0 answers
514 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. ...
Ryan Foy's user avatar
2 votes
1 answer
955 views

How do I create a player movement system in Farseer?

My group of students is helping produce a a 2D platformer. We tried making a pixel-based collision system which fell through. Now I am trying this physics engine on for size and see new ways to create ...
Ryan Foy's user avatar
0 votes
1 answer
232 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 ...
Homer_Simpson's user avatar
0 votes
0 answers
253 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 ...
SebastianStehle's user avatar
0 votes
1 answer
209 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 fast ...
Homer_Simpson's user avatar
1 vote
1 answer
69 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 ...
Qas Piano's user avatar
0 votes
2 answers
94 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 ...
Qas Piano's user avatar
2 votes
1 answer
423 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. ...
Qas Piano's user avatar
1 vote
1 answer
217 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 ...
Homer_Simpson's user avatar
0 votes
1 answer
161 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 ...
Qas Piano's user avatar
1 vote
1 answer
612 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 ...
starscape's user avatar
  • 416
1 vote
2 answers
417 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 ...
Erwan2212's user avatar
1 vote
0 answers
191 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 ...
Jonathan Dunn's user avatar
1 vote
0 answers
157 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 ...
t0rb's user avatar
  • 211
-1 votes
1 answer
495 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 ...
Bryan's user avatar
  • 315
2 votes
1 answer
329 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?
Bryan's user avatar
  • 315
0 votes
0 answers
1k 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 "...
Bryan's user avatar
  • 315
0 votes
1 answer
141 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: ...
Bryan's user avatar
  • 315
1 vote
1 answer
566 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 ...
Bryan's user avatar
  • 315