Genbox / VelcroPhysics

High performance 2D collision detection system with realistic physics responses.
MIT License
662 stars 114 forks source link

VelcroPhysics and Unity #54

Closed CorvoOrc closed 5 years ago

CorvoOrc commented 6 years ago

Hi, Im using Unity 2017.2.0f3 and trying Velcro.

First attempt I see following errors: 'expression body property accessor' is not available in C# 4. Please use language version 7 or greater.'example internal bool IsTouching => (_flags & ContactFlags.TouchingFlag) == ContactFlags.TouchingFlag; and so on. Result - 67 errors.

Ok, Im changed my configuration (Edit->Project Settings->Player->Other Settings-> Scripting Runtime Version from .Net 3.5 to .Net 4.6) Result - 17 errors. public bool Enabled { get => (_flags & ContactFlags.EnabledFlag) == ContactFlags.EnabledFlag; ...

I got new errors ('out variable declaration' is not available in C# 6. Please use language version 7 or greater.)

Velcro dont supported Unity and Im need using Farseer or problem with project configuration?

CorvoOrc commented 6 years ago

Im manually edit code (example WorldManifold.Initialize(ref manifold, ref xfA, radiusA, ref xfB, radiusB, out Vector2 normal, out FixedArray2 points, out _); )

Seems its work fine.