ZOMG! CAPSULES AS BOUNDING VOLUMES!

tourmaline
gareth 2007-03-27 00:12:45 +00:00
parent 7cb8ef79cb
commit 99c837f067
1 changed files with 12 additions and 7 deletions

View File

@ -70,8 +70,8 @@ namespace OpenSim.Physics.OdePlugin
public class OdeScene :PhysicsScene
{
private IntPtr world;
private IntPtr space;
public IntPtr world;
public IntPtr space;
private IntPtr contactgroup;
private double[] _heightmap;
@ -94,7 +94,7 @@ namespace OpenSim.Physics.OdePlugin
pos.X = position.X;
pos.Y = position.Y;
pos.Z = position.Z;
return new OdeCharacter();
return new OdeCharacter(this,pos);
}
public override PhysicsActor AddPrim(PhysicsVector position, PhysicsVector size)
@ -146,12 +146,17 @@ namespace OpenSim.Physics.OdePlugin
private PhysicsVector _acceleration;
private bool flying;
private float gravityAccel;
private IntPtr BoundingCapsule;
IntPtr capsule_geom;
d.Mass capsule_mass;
public OdeCharacter()
public OdeCharacter(OdeScene parent_scene, PhysicsVector pos)
{
_velocity = new PhysicsVector();
_position = new PhysicsVector();
_position = pos;
_acceleration = new PhysicsVector();
d.MassSetCapsule(out capsule_mass, 5.0f, 3, 0.5f, 2f);
capsule_geom = d.CreateCapsule(parent_scene.space, 0.5f, 2f);
}
public override bool Flying