From 469c6c000a85dafc3704b2ff053949e8588506f8 Mon Sep 17 00:00:00 2001 From: Robert Adams Date: Thu, 13 Dec 2012 16:31:28 -0800 Subject: Return the last set targetVelocity rather than the current velocity as the default action made available in PhysicsActor.TargetVelocity. Doesn't change any physics operation but makes DSG work better as the targetVelocity value does not keep moving around. --- OpenSim/Region/Physics/Manager/PhysicsActor.cs | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'OpenSim/Region/Physics/Manager/PhysicsActor.cs') diff --git a/OpenSim/Region/Physics/Manager/PhysicsActor.cs b/OpenSim/Region/Physics/Manager/PhysicsActor.cs index 34413e5..d119791 100644 --- a/OpenSim/Region/Physics/Manager/PhysicsActor.cs +++ b/OpenSim/Region/Physics/Manager/PhysicsActor.cs @@ -250,17 +250,20 @@ namespace OpenSim.Region.Physics.Manager public abstract Vector3 CenterOfMass { get; } /// - /// Velocity of this actor. + /// The desired velocity of this actor. /// /// /// Setting this provides a target velocity for physics scene updates. - /// Getting this returns the velocity calculated by physics scene updates, using factors such as target velocity, - /// time to accelerate and collisions. + /// Getting this returns the last set target. Fetch Velocity to get the current velocity. /// + protected Vector3 m_targetVelocity; public virtual Vector3 TargetVelocity { - get { return Velocity; } - set { Velocity = value; } + get { return m_targetVelocity; } + set { + m_targetVelocity = value; + Velocity = m_targetVelocity; + } } public abstract Vector3 Velocity { get; set; } -- cgit v1.1 From c658fa1c0dd83f23c66ccfedb12e8ab02ff01d0a Mon Sep 17 00:00:00 2001 From: Robert Adams Date: Thu, 7 Feb 2013 11:05:21 -0800 Subject: Add plumbing for physics properties to get to the physics engine. Addition of entries to PhysicsActor and setting code in SceneObjectPart. --- OpenSim/Region/Physics/Manager/PhysicsActor.cs | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'OpenSim/Region/Physics/Manager/PhysicsActor.cs') diff --git a/OpenSim/Region/Physics/Manager/PhysicsActor.cs b/OpenSim/Region/Physics/Manager/PhysicsActor.cs index d119791..4820ca4 100644 --- a/OpenSim/Region/Physics/Manager/PhysicsActor.cs +++ b/OpenSim/Region/Physics/Manager/PhysicsActor.cs @@ -235,6 +235,11 @@ namespace OpenSim.Region.Physics.Manager public abstract float Mass { get; } public abstract Vector3 Force { get; set; } + public virtual float Density { get; set; } + public virtual float Friction { get; set; } + public virtual float Restitution { get; set; } + public virtual float GravityModifier { get; set; } + public abstract int VehicleType { get; set; } public abstract void VehicleFloatParam(int param, float value); public abstract void VehicleVectorParam(int param, Vector3 value); -- cgit v1.1 From 9089757ea2cabe49f40de64b7e6befa13a4553c1 Mon Sep 17 00:00:00 2001 From: Melanie Date: Thu, 7 Feb 2013 21:05:58 +0000 Subject: Revert "Add plumbing for physics properties to get to the physics engine." This reverts commit c658fa1c0dd83f23c66ccfedb12e8ab02ff01d0a. --- OpenSim/Region/Physics/Manager/PhysicsActor.cs | 5 ----- 1 file changed, 5 deletions(-) (limited to 'OpenSim/Region/Physics/Manager/PhysicsActor.cs') diff --git a/OpenSim/Region/Physics/Manager/PhysicsActor.cs b/OpenSim/Region/Physics/Manager/PhysicsActor.cs index 4820ca4..d119791 100644 --- a/OpenSim/Region/Physics/Manager/PhysicsActor.cs +++ b/OpenSim/Region/Physics/Manager/PhysicsActor.cs @@ -235,11 +235,6 @@ namespace OpenSim.Region.Physics.Manager public abstract float Mass { get; } public abstract Vector3 Force { get; set; } - public virtual float Density { get; set; } - public virtual float Friction { get; set; } - public virtual float Restitution { get; set; } - public virtual float GravityModifier { get; set; } - public abstract int VehicleType { get; set; } public abstract void VehicleFloatParam(int param, float value); public abstract void VehicleVectorParam(int param, Vector3 value); -- cgit v1.1 From 22675e6b14ce1b180f517c1ab92627d283192032 Mon Sep 17 00:00:00 2001 From: Melanie Date: Thu, 7 Feb 2013 23:22:00 +0000 Subject: Add some more code from Avination. This changes physics actor stuff around to work with the new params. Not actually plumbed just yet. --- OpenSim/Region/Physics/Manager/PhysicsActor.cs | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'OpenSim/Region/Physics/Manager/PhysicsActor.cs') diff --git a/OpenSim/Region/Physics/Manager/PhysicsActor.cs b/OpenSim/Region/Physics/Manager/PhysicsActor.cs index d119791..bd806eb 100644 --- a/OpenSim/Region/Physics/Manager/PhysicsActor.cs +++ b/OpenSim/Region/Physics/Manager/PhysicsActor.cs @@ -147,6 +147,8 @@ namespace OpenSim.Region.Physics.Manager public abstract Vector3 Size { get; set; } + public virtual byte PhysicsShapeType { get; set; } + public abstract PrimitiveBaseShape Shape { set; } uint m_baseLocalID; @@ -218,9 +220,11 @@ namespace OpenSim.Region.Physics.Manager handler(e); } - public virtual void SetMaterial (int material) - { - } + public virtual void SetMaterial (int material) { } + public virtual float Density { get; set; } + public virtual float GravModifier { get; set; } + public virtual float Friction { get; set; } + public virtual float Restitution { get; set; } /// /// Position of this actor. -- cgit v1.1