farseer

Monogame Ambiguous Vector2

痞子三分冷 提交于 2020-01-16 05:08:04
问题 I am having an issue where I keep getting ambiguity errors between Monogame and XNA libraries. No matter what I do, I cannot get it to compile. I have removed XNA off my computer and yet the error still persists. The full error is: Error 4 Argument 1: cannot convert from 'Microsoft.Xna.Framework.Vector2 [c:\Program Files (x86)\MonoGame\v3.0\Assemblies\WindowsPhone\x86\MonoGame.Framework.dll]' to 'Microsoft.Xna.Framework.Vector2' on lines such as: EngineGlobal.world = new World(new Vector2(0,9

Farseer - Particles doesn´t move/bounce accord to borders

↘锁芯ラ 提交于 2019-12-24 21:20:09
问题 I made my borders with this: class Maze { private Body _agentBody; private Sprite _box; private GameplayScreen _screen; private float _offset; public Maze(World world, GameplayScreen screen, Vector2 position) { _agentBody = BodyFactory.CreateBody(world, position); _agentBody.BodyType = BodyType.Dynamic; _agentBody.IsStatic = true; _agentBody.Restitution = 0.2f; _agentBody.Friction = 0.2f; _offset = ConvertUnits.ToDisplayUnits(1f); // spodek _agentBody.CreateFixture(new PolygonShape

Farseer Meter/Pixel Ratio

心不动则不痛 提交于 2019-12-08 10:26:47
问题 I've done a lot with box2d in c++, and am giving C# a try. It looks like Farseer is generally used in place of Box2D (I'm aware of Box2DXNA, but it seems a little outdated.) So, Farseer is what I've been using. When I was using C++ and Box2D, everyone always advised against using a 1pixel/meter ratio (For what reason, I don't know,) and usually suggested using somewhere around 30pixels/meter. As I've been researching Farseer, I've seen a lot of conflicting statements. Some say to use 1pixel