ZOMG! CAPSULES AS BOUNDING VOLUMES!
parent
7cb8ef79cb
commit
99c837f067
|
@ -70,8 +70,8 @@ namespace OpenSim.Physics.OdePlugin
|
||||||
|
|
||||||
public class OdeScene :PhysicsScene
|
public class OdeScene :PhysicsScene
|
||||||
{
|
{
|
||||||
private IntPtr world;
|
public IntPtr world;
|
||||||
private IntPtr space;
|
public IntPtr space;
|
||||||
private IntPtr contactgroup;
|
private IntPtr contactgroup;
|
||||||
private double[] _heightmap;
|
private double[] _heightmap;
|
||||||
|
|
||||||
|
@ -94,7 +94,7 @@ namespace OpenSim.Physics.OdePlugin
|
||||||
pos.X = position.X;
|
pos.X = position.X;
|
||||||
pos.Y = position.Y;
|
pos.Y = position.Y;
|
||||||
pos.Z = position.Z;
|
pos.Z = position.Z;
|
||||||
return new OdeCharacter();
|
return new OdeCharacter(this,pos);
|
||||||
}
|
}
|
||||||
|
|
||||||
public override PhysicsActor AddPrim(PhysicsVector position, PhysicsVector size)
|
public override PhysicsActor AddPrim(PhysicsVector position, PhysicsVector size)
|
||||||
|
@ -146,12 +146,17 @@ namespace OpenSim.Physics.OdePlugin
|
||||||
private PhysicsVector _acceleration;
|
private PhysicsVector _acceleration;
|
||||||
private bool flying;
|
private bool flying;
|
||||||
private float gravityAccel;
|
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();
|
_velocity = new PhysicsVector();
|
||||||
_position = new PhysicsVector();
|
_position = pos;
|
||||||
_acceleration = new PhysicsVector();
|
_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
|
public override bool Flying
|
||||||
|
|
Loading…
Reference in New Issue