diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/Physics/BulletSPlugin/BSCharacter.cs | 19 |
1 files changed, 4 insertions, 15 deletions
diff --git a/OpenSim/Region/Physics/BulletSPlugin/BSCharacter.cs b/OpenSim/Region/Physics/BulletSPlugin/BSCharacter.cs index 8c7061d..2a634b9 100644 --- a/OpenSim/Region/Physics/BulletSPlugin/BSCharacter.cs +++ b/OpenSim/Region/Physics/BulletSPlugin/BSCharacter.cs | |||
@@ -99,26 +99,12 @@ public sealed class BSCharacter : BSPhysObject | |||
99 | DetailLog("{0},BSCharacter.create,call,size={1},scale={2},density={3},volume={4},mass={5}", | 99 | DetailLog("{0},BSCharacter.create,call,size={1},scale={2},density={3},volume={4},mass={5}", |
100 | LocalID, _size, Scale, _avatarDensity, _avatarVolume, MassRaw); | 100 | LocalID, _size, Scale, _avatarDensity, _avatarVolume, MassRaw); |
101 | 101 | ||
102 | ShapeData shapeData = new ShapeData(); | ||
103 | shapeData.ID = LocalID; | ||
104 | shapeData.Type = ShapeData.PhysicsShapeType.SHAPE_AVATAR; | ||
105 | shapeData.Position = _position; | ||
106 | shapeData.Rotation = _orientation; | ||
107 | shapeData.Velocity = _velocity; | ||
108 | shapeData.Size = Scale; // capsule is a native shape but scale is not just <1,1,1> | ||
109 | shapeData.Scale = Scale; | ||
110 | shapeData.Mass = _mass; | ||
111 | shapeData.Buoyancy = _buoyancy; | ||
112 | shapeData.Static = ShapeData.numericFalse; | ||
113 | shapeData.Friction = PhysicsScene.Params.avatarStandingFriction; | ||
114 | shapeData.Restitution = PhysicsScene.Params.avatarRestitution; | ||
115 | |||
116 | // do actual create at taint time | 102 | // do actual create at taint time |
117 | PhysicsScene.TaintedObject("BSCharacter.create", delegate() | 103 | PhysicsScene.TaintedObject("BSCharacter.create", delegate() |
118 | { | 104 | { |
119 | DetailLog("{0},BSCharacter.create,taint", LocalID); | 105 | DetailLog("{0},BSCharacter.create,taint", LocalID); |
120 | // New body and shape into BSBody and BSShape | 106 | // New body and shape into BSBody and BSShape |
121 | PhysicsScene.Shapes.GetBodyAndShape(true, PhysicsScene.World, this, shapeData, null, null, null); | 107 | PhysicsScene.Shapes.GetBodyAndShape(true, PhysicsScene.World, this, null, null); |
122 | 108 | ||
123 | SetPhysicalProperties(); | 109 | SetPhysicalProperties(); |
124 | }); | 110 | }); |
@@ -212,6 +198,9 @@ public sealed class BSCharacter : BSPhysObject | |||
212 | { | 198 | { |
213 | set { BaseShape = value; } | 199 | set { BaseShape = value; } |
214 | } | 200 | } |
201 | // I want the physics engine to make an avatar capsule | ||
202 | public override ShapeData.PhysicsShapeType PreferredPhysicalShape | ||
203 | { get { return ShapeData.PhysicsShapeType.SHAPE_AVATAR; } } | ||
215 | 204 | ||
216 | public override bool Grabbed { | 205 | public override bool Grabbed { |
217 | set { _grabbed = value; } | 206 | set { _grabbed = value; } |