ItemComponent GUIFrames, functional steering, radar, separate power and signals, improved d.gz, tweak swimming

This commit is contained in:
Regalis
2015-06-29 23:51:01 +03:00
parent 004608acd8
commit b493ed2b39
42 changed files with 473 additions and 182 deletions
+11 -4
View File
@@ -62,6 +62,12 @@ namespace Subsurface
get { return lastPickedFraction; }
}
public List<Vector2> HullVertices
{
get;
private set;
}
public Md5Hash Hash
{
get
@@ -401,9 +407,7 @@ namespace Subsurface
ApplyForce(-Vector2.Normalize(speed)*drag);
}
//hullBodies[0].body.LinearVelocity = -hullBodies[0].body.Position;
hullBody.SetTransform(Vector2.Zero , 0.0f);
if (collidingCell == null)
@@ -697,6 +701,9 @@ namespace Subsurface
}
List<Vector2> convexHull = GenerateConvexHull();
HullVertices = convexHull;
for (int i = 0; i < convexHull.Count; i++)
{
convexHull[i] = ConvertUnits.ToSimUnits(convexHull[i]);
@@ -718,7 +725,7 @@ namespace Subsurface
var triangulatedVertices = Triangulate.ConvexPartition(_shapevertices, TriangulationAlgorithm.Bayazit);
Body hullBody = BodyFactory.CreateCompoundPolygon(Game1.world, triangulatedVertices, 5.0f);
hullBody = BodyFactory.CreateCompoundPolygon(Game1.world, triangulatedVertices, 5.0f);
hullBody.BodyType = BodyType.Dynamic;
hullBody.CollisionCategories = Physics.CollisionMisc;