Permalink
Browse files

More cleanup in preparation.

  • Loading branch information...
1 parent 29f0757 commit a9d95dde919530f27b3da1fb1968ca139c3c4651 @RevolutionSmythe RevolutionSmythe committed Apr 7, 2013
View
6 Aurora/BotManager/Bot.cs
@@ -653,8 +653,7 @@ public void GetNextDestination()
TravelMode state;
bool teleport;
if (!ForceCloseToPoint)
- m_closeToPoint = m_controller.PhysicsActor is PhysicsCharacter &&
- ((PhysicsCharacter) m_controller.PhysicsActor).Flying
+ m_closeToPoint = m_controller.PhysicsActor.Flying
? 1.5f
: 1.0f;
if (m_nodeGraph.GetNextPosition(m_controller.AbsolutePosition, m_closeToPoint, 60, out pos, out state,
@@ -918,8 +917,7 @@ private void FollowDecision()
//If we were having to fly to here, stop flying
if (jumpTry > 0)
{
- if (m_controller.PhysicsActor is PhysicsCharacter)
- ((PhysicsCharacter) m_controller.PhysicsActor).Flying = false;
+ m_controller.PhysicsActor.Flying = false;
walkTo(m_controller.AbsolutePosition);
//Fix the animation from flying > walking
m_controller.UpdateMovementAnimations(false);
View
2 Aurora/ClientStack/LLClientView.cs
@@ -763,7 +763,7 @@ public void SendRegionHandshake(RegionInfo regionInfo, RegionHandshakeArgs args)
new RegionHandshakePacket.RegionInfo4Block
{
RegionFlagsExtended = args.regionFlags,
- RegionProtocols = (ulong) RegionProtocols.AgentAppearanceService
+ RegionProtocols = (ulong) RegionProtocols.None //(ulong) RegionProtocols.AgentAppearanceService
}
};
handshake.RegionInfo3 = new RegionHandshakePacket.RegionInfo3Block
View
7 Aurora/Framework/Physics/IMesher.cs
@@ -36,7 +36,6 @@ public interface IMesher
{
IMesh CreateMesh(String primName, PrimitiveBaseShape primShape, Vector3 size, float lod, bool isPhysical);
void RemoveMesh(ulong key);
- void FinishedMeshing();
}
public interface IMesh
@@ -51,10 +50,8 @@ public interface IMesh
OpenMetaverse.StructuredData.OSD Serialize();
- /*int[] getIndexListAsInt();
-
+ int[] getIndexListAsInt();
float[] getVertexListAsFloat();
-
- List<Vector3> getVertexList();*/
+ List<Vector3> getVertexList();
}
}
View
222 Aurora/Framework/Physics/PhysicsActor.cs
@@ -61,7 +61,7 @@ public CollisionEventUpdate()
m_objCollisionList = new Dictionary<uint, ContactPoint>();
}
- public void addCollider(uint localID, ContactPoint contact)
+ public void AddCollider(uint localID, ContactPoint contact)
{
Cleared = false;
/*ContactPoint oldCol;
@@ -132,113 +132,10 @@ public enum ActorTypes
Water = 4
}
- public abstract class PhysicsCharacter : PhysicsActor
- {
- public abstract bool IsJumping { get; }
- public abstract float SpeedModifier { get; set; }
- public abstract bool IsPreJumping { get; }
- public abstract bool Flying { get; set; }
- public abstract bool SetAlwaysRun { get; set; }
-
- /// <summary>
- /// The desired velocity of this actor.
- /// </summary>
- /// <remarks>
- /// Setting this provides a target velocity for physics scene updates.
- /// Getting this returns the last set target. Fetch Velocity to get the current velocity.
- /// </remarks>
- protected Vector3 m_targetVelocity;
- public virtual Vector3 TargetVelocity
- {
- get { return m_targetVelocity; }
- set
- {
- m_targetVelocity = value;
- Velocity = m_targetVelocity;
- }
- }
-
- public delegate bool checkForRegionCrossing();
-
- public event checkForRegionCrossing OnCheckForRegionCrossing;
-
- public virtual bool CheckForRegionCrossing()
- {
- // Make a temporary copy of the event to avoid possibility of
- // a race condition if the last subscriber unsubscribes
- // immediately after the null check and before the event is raised.
- checkForRegionCrossing handler = OnCheckForRegionCrossing;
-
- if (handler != null)
- return handler();
- return false;
- }
- }
-
- public abstract class PhysicsObject : PhysicsActor
- {
- public virtual void link(PhysicsObject obj) { }
-
- public virtual void delink() { }
-
- public virtual bool LinkSetIsColliding { get; set; }
-
- public virtual void LockAngularMotion(Vector3 axis) { }
-
- public virtual PrimitiveBaseShape Shape
- {
- get { return null; }
- set { if (value == null) throw new ArgumentNullException("value"); }
- }
-
- public abstract bool Selected { set; }
-
- public abstract void CrossingFailure();
-
- public virtual void SetMaterial(int material, float friction, float restitution, float gravityMultiplier, float density)
- {
- }
-
- public virtual float Friction { get; set; }
- public virtual float Restitution { get; set; }
- public virtual float GravityMultiplier { get; set; }
- public virtual float Density { get; set; }
- public virtual byte PhysicsShapeType { get; set; }
-
- public virtual int VehicleType { get; set; }
- public virtual void VehicleFloatParam(int param, float value) { }
- public virtual void VehicleVectorParam(int param, Vector3 value) { }
- public virtual void VehicleRotationParam(int param, Quaternion rotation) { }
- public virtual void VehicleFlags(int param, bool remove) { }
-
- public virtual void SetCameraPos(Quaternion CameraRotation) { }
-
- public virtual bool BlockPhysicalReconstruction { get; set; }
- public abstract float Buoyancy { get; set; }
- public abstract Vector3 CenterOfMass { get; }
- public abstract Vector3 Torque { get; set; }
- public abstract void SubscribeEvents(int ms);
- public abstract void UnSubscribeEvents();
-
- public virtual bool VolumeDetect { get; set; }
- public abstract Vector3 Acceleration { get; }
- public abstract void AddAngularForce(Vector3 force, bool pushforce);
-
- public virtual void ClearVelocity()
- {
- }
-
- public event BlankHandler OnPhysicalRepresentationChanged;
-
- public void FirePhysicalRepresentationChanged()
- {
- if (OnPhysicalRepresentationChanged != null)
- OnPhysicalRepresentationChanged();
- }
- }
-
public abstract class PhysicsActor
{
+ #region Actor Declares
+
// disable warning: public events
#pragma warning disable 67
public delegate void RequestTerseUpdate();
@@ -253,10 +150,9 @@ public abstract class PhysicsActor
#pragma warning restore 67
public abstract Vector3 Size { get; set; }
-
- public abstract uint LocalID { get; set; }
-
- public UUID UUID { get; set; }
+ public virtual uint LocalID { get; set; }
+ public virtual string Name { get; set; }
+ public virtual UUID UUID { get; set; }
public virtual void RequestPhysicsterseUpdate()
{
@@ -312,10 +208,11 @@ public virtual void TriggerMovementUpdate()
}
public abstract Vector3 Position { get; set; }
- public abstract float Mass { get; }
+ public abstract Vector3 Velocity { get; set; }
+ public virtual Vector3 Acceleration { get; set; }
public abstract Vector3 Force { get; set; }
- public abstract Vector3 Velocity { get; set; }
+ public abstract float Mass { get; }
public abstract float CollisionScore { get; set; }
public abstract Quaternion Orientation { get; set; }
public abstract int PhysicsActorType { get; }
@@ -325,11 +222,15 @@ public virtual void TriggerMovementUpdate()
public abstract bool IsTruelyColliding { get; set; }
public abstract bool FloatOnWater { set; }
public abstract Vector3 RotationalVelocity { get; set; }
-
+ public virtual float Friction { get; set; }
+ public virtual float Restitution { get; set; }
+ public virtual float GravityMultiplier { get; set; }
+ public virtual float Density { get; set; }
+ public virtual byte PhysicsShapeType { get; set; }
public abstract void AddForce(Vector3 force, bool pushforce);
public abstract bool SubscribedEvents();
- public abstract void SendCollisions();
+ public abstract bool SendCollisions();
public abstract void AddCollisionEvent(uint localID, ContactPoint contact);
public virtual void ForceSetVelocity(Vector3 velocity)
@@ -339,9 +240,92 @@ public virtual void ForceSetVelocity(Vector3 velocity)
public virtual void ForceSetPosition(Vector3 position)
{
}
+
+ #endregion
+
+ #region Object Declares
+
+ public virtual void link(PhysicsActor obj) { }
+ public virtual void delink() { }
+ public virtual bool LinkSetIsColliding { get; set; }
+ public virtual void LockAngularMotion(Vector3 axis) { }
+ public virtual void CrossingFailure() { }
+ public virtual void SetMaterial(int material, float friction, float restitution, float gravityMultiplier, float density) { }
+ public virtual void SetCameraPos(Quaternion CameraRotation) { }
+ public virtual void ClearVelocity() { }
+
+ public virtual int VehicleType { get; set; }
+ public virtual void VehicleFloatParam(int param, float value) { }
+ public virtual void VehicleVectorParam(int param, Vector3 value) { }
+ public virtual void VehicleRotationParam(int param, Quaternion rotation) { }
+ public virtual void VehicleFlags(int param, bool remove) { }
+ public virtual void AddAngularForce(Vector3 force, bool pushforce) { }
+
+ public virtual PrimitiveBaseShape Shape { get; set; }
+ public virtual bool Selected { get; set; }
+ public virtual bool BlockPhysicalReconstruction { get; set; }
+ public virtual float Buoyancy { get; set; }
+ public virtual Vector3 CenterOfMass { get; set; }
+ public virtual Vector3 Torque { get; set; }
+ public virtual void SubscribeEvents(int ms) { }
+ public virtual void UnSubscribeEvents() { }
+ public virtual bool VolumeDetect { get; set; }
+
+ public event BlankHandler OnPhysicalRepresentationChanged;
+
+ public void FirePhysicalRepresentationChanged()
+ {
+ if (OnPhysicalRepresentationChanged != null)
+ OnPhysicalRepresentationChanged();
+ }
+
+ #endregion
+
+ #region Character Defines
+
+ public virtual bool IsJumping { get; set; }
+ public virtual float SpeedModifier { get; set; }
+ public virtual bool IsPreJumping { get; set; }
+ public virtual bool Flying { get; set; }
+ public virtual bool SetAlwaysRun { get; set; }
+
+ /// <summary>
+ /// The desired velocity of this actor.
+ /// </summary>
+ /// <remarks>
+ /// Setting this provides a target velocity for physics scene updates.
+ /// Getting this returns the last set target. Fetch Velocity to get the current velocity.
+ /// </remarks>
+ protected Vector3 m_targetVelocity;
+ public virtual Vector3 TargetVelocity
+ {
+ get { return m_targetVelocity; }
+ set
+ {
+ m_targetVelocity = value;
+ Velocity = m_targetVelocity;
+ }
+ }
+
+ public delegate bool checkForRegionCrossing();
+ public event checkForRegionCrossing OnCheckForRegionCrossing;
+
+ public virtual bool CheckForRegionCrossing()
+ {
+ // Make a temporary copy of the event to avoid possibility of
+ // a race condition if the last subscriber unsubscribes
+ // immediately after the null check and before the event is raised.
+ checkForRegionCrossing handler = OnCheckForRegionCrossing;
+
+ if (handler != null)
+ return handler();
+ return false;
+ }
+
+ #endregion
}
- public class NullObjectPhysicsActor : PhysicsObject
+ public class NullObjectPhysicsActor : PhysicsActor
{
public override Vector3 Position
{
@@ -473,16 +457,17 @@ public override bool SubscribedEvents()
return false;
}
- public override void SendCollisions()
+ public override bool SendCollisions()
{
+ return false;
}
public override void AddCollisionEvent(uint CollidedWith, ContactPoint contact)
{
}
}
- public class NullCharacterPhysicsActor : PhysicsCharacter
+ public class NullCharacterPhysicsActor : PhysicsActor
{
public override bool IsJumping
{
@@ -599,8 +584,9 @@ public override bool SubscribedEvents()
return false;
}
- public override void SendCollisions()
+ public override bool SendCollisions()
{
+ return false;
}
public override void AddCollisionEvent(uint CollidedWith, ContactPoint contact)
View
24 Aurora/Framework/Physics/PhysicsScene.cs
@@ -69,7 +69,7 @@ public virtual bool IsThreaded
public virtual bool DisableCollisions { get; set; }
- public virtual List<PhysicsObject> ActiveObjects
+ public virtual List<PhysicsActor> ActiveObjects
{
get { return null; }
}
@@ -102,15 +102,16 @@ public virtual bool UseUnderWaterPhysics
public abstract void Initialise(IMesher meshmerizer, IScene scene);
public abstract void PostInitialise(IConfigSource config);
- public abstract PhysicsCharacter AddAvatar(string avName, Vector3 position, Quaternion rotation, Vector3 size,
+ public abstract PhysicsActor AddAvatar(string avName, Vector3 position, Quaternion rotation, Vector3 size,
bool isFlying, uint LocalID, UUID UUID);
- public abstract void RemoveAvatar(PhysicsCharacter actor);
+ public abstract void RemoveAvatar(PhysicsActor actor);
- public abstract void RemovePrim(PhysicsObject prim);
- public abstract void DeletePrim(PhysicsObject prim);
+ public abstract void RemovePrim(PhysicsActor prim);
+ public abstract void DeletePrim(PhysicsActor prim);
- public abstract PhysicsObject AddPrimShape(string name, byte physicsType, PrimitiveBaseShape shape, Vector3 position, Vector3 size, Quaternion rotation, bool isPhysical);
+ public abstract PhysicsActor AddPrimShape(UUID primID, uint localID, string name, byte physicsType, PrimitiveBaseShape shape,
+ Vector3 position, Vector3 size, Quaternion rotation, bool isPhysical);
public abstract void Simulate(float timeStep);
@@ -211,22 +212,22 @@ public override void PostInitialise(IConfigSource config)
{
}
- public override PhysicsCharacter AddAvatar(string avName, Vector3 position, Quaternion rotation, Vector3 size,
+ public override PhysicsActor AddAvatar(string avName, Vector3 position, Quaternion rotation, Vector3 size,
bool isFlying, uint localID, UUID UUID)
{
MainConsole.Instance.InfoFormat("[PHYSICS]: NullPhysicsScene : AddAvatar({0})", position);
return new NullCharacterPhysicsActor();
}
- public override void RemoveAvatar(PhysicsCharacter actor)
+ public override void RemoveAvatar(PhysicsActor actor)
{
}
- public override void RemovePrim(PhysicsObject prim)
+ public override void RemovePrim(PhysicsActor prim)
{
}
- public override void DeletePrim(PhysicsObject prim)
+ public override void DeletePrim(PhysicsActor prim)
{
}
@@ -242,7 +243,8 @@ public override PhysicsActor AddPrim(Vector3 position, Vector3 size, Quaternion
}
*/
- public override PhysicsObject AddPrimShape(string name, byte physicsType, PrimitiveBaseShape shape, Vector3 position, Vector3 size, Quaternion rotation, bool isPhysical)
+ public override PhysicsActor AddPrimShape(UUID primID, uint localID, string name, byte physicsType, PrimitiveBaseShape shape,
+ Vector3 position, Vector3 size, Quaternion rotation, bool isPhysical)
{
return new NullObjectPhysicsActor();
}
View
110 Aurora/Framework/Physics/PhysicsSensor.cs
@@ -1,110 +0,0 @@
-/*
- * Copyright (c) Contributors, http://aurora-sim.org/, http://opensimulator.org/
- * See CONTRIBUTORS.TXT for a full list of copyright holders.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * * Neither the name of the Aurora-Sim Project nor the
- * names of its contributors may be used to endorse or promote products
- * derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-using System;
-using System.Timers;
-using OpenMetaverse;
-
-namespace Aurora.Framework.Physics
-{
- [Flags]
- public enum SenseType : uint
- {
- NONE = 0,
- AGENT = 1,
- ACTIVE = 2,
- PASSIVE = 3,
- SCRIPTED = 4
- }
-
- public abstract class PhysicsSensor
- {
- public static PhysicsSensor Null
- {
- get { return new NullPhysicsSensor(); }
- }
-
- public abstract Vector3 Position { get; set; }
- public abstract float radianarc { get; set; }
- public abstract string targetname { get; set; }
- public abstract Guid targetKey { get; set; }
- public abstract SenseType sensetype { get; set; }
- public abstract float range { get; set; }
- public abstract float rateSeconds { get; set; }
- public abstract void TimerCallback(object obj, ElapsedEventArgs eea);
- }
-
- public class NullPhysicsSensor : PhysicsSensor
- {
- public override Vector3 Position
- {
- get { return Vector3.Zero; }
- set { return; }
- }
-
- public override float radianarc
- {
- get { return 0f; }
- set { }
- }
-
- public override string targetname
- {
- get { return ""; }
- set { }
- }
-
- public override Guid targetKey
- {
- get { return Guid.Empty; }
- set { }
- }
-
- public override SenseType sensetype
- {
- get { return SenseType.NONE; }
- set { }
- }
-
- public override float range
- {
- get { return 0; }
- set { }
- }
-
- public override float rateSeconds
- {
- get { return 0; }
- set { }
- }
-
- public override void TimerCallback(object obj, ElapsedEventArgs eea)
- {
- // don't do squat
- }
- }
-}
View
2 Aurora/Framework/PresenceInfo/IScenePresence.cs
@@ -41,7 +41,7 @@ public interface IScenePresence : IEntity, IRegistryCore
IAnimator Animator { get; }
- PhysicsCharacter PhysicsActor { get; set; }
+ PhysicsActor PhysicsActor { get; set; }
/// <summary>
/// Is this client really in this region?
View
2 Aurora/Framework/SceneInfo/ISceneChildEntity.cs
@@ -129,7 +129,7 @@ public interface ISceneChildEntity : IEntity
Quaternion GetWorldRotation();
- PhysicsObject PhysActor { get; set; }
+ PhysicsActor PhysActor { get; set; }
TaskInventoryDictionary TaskInventory { get; set; }
View
66 Aurora/Framework/Utilities/Util.cs
@@ -47,6 +47,7 @@
using System.Net.Sockets;
using System.Reflection;
using System.Reflection.Emit;
+using System.Runtime.InteropServices;
using System.Runtime.Serialization;
using System.Runtime.Serialization.Formatters.Binary;
using System.Security.Cryptography;
@@ -731,6 +732,71 @@ public static bool IsLinux
}
}
+ /// <summary>
+ /// Is the platform Windows?
+ /// </summary>
+ /// <returns>true if so, false otherwise</returns>
+ public static bool IsWindows()
+ {
+ PlatformID platformId = Environment.OSVersion.Platform;
+
+ return (platformId == PlatformID.Win32NT
+ || platformId == PlatformID.Win32S
+ || platformId == PlatformID.Win32Windows
+ || platformId == PlatformID.WinCE);
+ }
+
+ public static bool LoadArchSpecificWindowsDll(string libraryName)
+ {
+ // We do this so that OpenSimulator on Windows loads the correct native library depending on whether
+ // it's running as a 32-bit process or a 64-bit one. By invoking LoadLibary here, later DLLImports
+ // will find it already loaded later on.
+ //
+ // This isn't necessary for other platforms (e.g. Mac OSX and Linux) since the DLL used can be
+ // controlled in config files.
+ string nativeLibraryPath;
+
+ if (Util.Is64BitProcess())
+ nativeLibraryPath = "lib64/" + libraryName;
+ else
+ nativeLibraryPath = "lib32/" + libraryName;
+
+ MainConsole.Instance.DebugFormat("[UTIL]: Loading native Windows library at {0}", nativeLibraryPath);
+
+ if (Util.LoadLibrary(nativeLibraryPath) == IntPtr.Zero)
+ {
+ MainConsole.Instance.ErrorFormat(
+ "[UTIL]: Couldn't find native Windows library at {0}", nativeLibraryPath);
+
+ return false;
+ }
+ else
+ {
+ return true;
+ }
+ }
+
+ /// <summary>
+ /// Used to trigger an early library load on Windows systems.
+ /// </summary>
+ /// <remarks>
+ /// Required to get 32-bit and 64-bit processes to automatically use the
+ /// appropriate native library.
+ /// </remarks>
+ /// <param name="dllToLoad"></param>
+ /// <returns></returns>
+ [DllImport("kernel32.dll")]
+ public static extern IntPtr LoadLibrary(string dllToLoad);
+
+ /// <summary>
+ /// Determine whether the current process is 64 bit
+ /// </summary>
+ /// <returns>true if so, false if not</returns>
+ public static bool Is64BitProcess()
+ {
+ return IntPtr.Size == 8;
+ }
+
public static int UnixTimeSinceEpoch()
{
return ToUnixTime(DateTime.UtcNow);
View
10 Aurora/Modules/World/PhysicsState/PhysicsStateModule.cs
@@ -105,7 +105,7 @@ private WorldPhysicsState MakePhysicsState()
{
WorldPhysicsState state = new WorldPhysicsState();
//Add all active objects in the scene
- foreach (PhysicsObject prm in m_scene.PhysicsScene.ActiveObjects)
+ foreach (PhysicsActor prm in m_scene.PhysicsScene.ActiveObjects)
{
state.AddPrim(prm);
}
@@ -148,7 +148,7 @@ public class WorldPhysicsState
{
private readonly Dictionary<UUID, PhysicsState> m_activePrims = new Dictionary<UUID, PhysicsState>();
- public void AddPrim(PhysicsObject prm)
+ public void AddPrim(PhysicsActor prm)
{
PhysicsState state = new PhysicsState
{
@@ -160,7 +160,7 @@ public void AddPrim(PhysicsObject prm)
m_activePrims[prm.UUID] = state;
}
- public void AddAvatar(PhysicsCharacter prm)
+ public void AddAvatar(PhysicsActor prm)
{
PhysicsState state = new PhysicsState
{
@@ -188,7 +188,7 @@ public void Reload(IScene scene, float direction)
}
}
- private void ResetPrim(PhysicsObject physicsObject, PhysicsState physicsState, float direction)
+ private void ResetPrim(PhysicsActor physicsObject, PhysicsState physicsState, float direction)
{
physicsObject.Position = physicsState.Position;
physicsObject.Orientation = physicsState.Rotation;
@@ -198,7 +198,7 @@ private void ResetPrim(PhysicsObject physicsObject, PhysicsState physicsState, f
physicsObject.RequestPhysicsterseUpdate();
}
- private void ResetAvatar(PhysicsCharacter physicsObject, PhysicsState physicsState, float direction)
+ private void ResetAvatar(PhysicsActor physicsObject, PhysicsState physicsState, float direction)
{
physicsObject.Position = physicsState.Position;
physicsObject.ForceSetPosition(physicsState.Position);
View
26 Aurora/Physics/AuroraOpenDynamicsEngine/AODECharacter.cs
@@ -32,7 +32,7 @@
namespace Aurora.Physics.AuroraOpenDynamicsEngine
{
- public class AuroraODECharacter : PhysicsCharacter
+ public class AuroraODECharacter : PhysicsActor
{
#region Declares
@@ -81,7 +81,6 @@ public class AuroraODECharacter : PhysicsCharacter
protected float m_mass = 80f;
protected string m_name = String.Empty;
- protected bool m_pidControllerActive = true;
protected int m_preJumpCounter;
protected Vector3 m_preJumpForce = Vector3.Zero;
protected Vector3 m_rotationalVelocity;
@@ -323,7 +322,6 @@ public override Vector3 Size
}
_lastSetSize = value;
- m_pidControllerActive = true;
CAPSULE_RADIUS = _parent_scene.avCapRadius;
CAPSULE_LENGTH = (_lastSetSize.Z*1.1f) - CAPSULE_RADIUS*2.0f;
Velocity = Vector3.Zero;
@@ -367,10 +365,7 @@ public override Vector3 Velocity
set
{
if (value.IsFinite())
- {
- m_pidControllerActive = true;
m_targetVelocity = value;
- }
else
{
MainConsole.Instance.Warn("[PHYSICS]: Got a NaN velocity from Scene in a Character");
@@ -398,16 +393,6 @@ public override Quaternion Orientation
}
}
- /// <summary>
- /// turn the PID controller on or off.
- /// The PID Controller will turn on all by itself in many situations
- /// </summary>
- /// <param name="status"></param>
- public void SetPidStatus(bool status)
- {
- m_pidControllerActive = status;
- }
-
public override void ForceSetVelocity(Vector3 velocity)
{
_velocity = velocity;
@@ -741,7 +726,6 @@ public override void AddForce(Vector3 force, bool pushforce)
{
if (pushforce)
{
- m_pidControllerActive = false;
_parent_scene.AddSimulationChange(() =>
{
if (Body != IntPtr.Zero)
@@ -750,7 +734,6 @@ public override void AddForce(Vector3 force, bool pushforce)
}
else
{
- m_pidControllerActive = true;
m_targetVelocity.X += force.X;
m_targetVelocity.Y += force.Y;
m_targetVelocity.Z += force.Z;
@@ -789,19 +772,20 @@ public void Destroy()
public override void AddCollisionEvent(uint CollidedWith, ContactPoint contact)
{
- CollisionEventsThisFrame.addCollider(CollidedWith, contact);
+ CollisionEventsThisFrame.AddCollider(CollidedWith, contact);
}
- public override void SendCollisions()
+ public override bool SendCollisions()
{
if (!IsPhysical)
- return; //Not physical, its not supposed to be here
+ return false; //Not physical, its not supposed to be here
if (!CollisionEventsThisFrame.Cleared)
{
base.SendCollisionUpdate(CollisionEventsThisFrame.Copy());
CollisionEventsThisFrame.Clear();
}
+ return true;
}
public override bool SubscribedEvents()
View
39 Aurora/Physics/AuroraOpenDynamicsEngine/AODEPhysicsScene.cs
@@ -53,7 +53,6 @@ public class AuroraODEPhysicsScene : PhysicsScene
public float gravityz = -9.8f;
public Vector3 gravityVector;
public Vector3 gravityVectorNormalized;
- public bool m_hasSetUpPrims;
protected readonly IntPtr contactgroup;
@@ -110,9 +109,9 @@ public class AuroraODEPhysicsScene : PhysicsScene
protected readonly object _activeprimsLock = new object();
protected readonly HashSet<AuroraODEPrim> _activeprims = new HashSet<AuroraODEPrim>();
- public override List<PhysicsObject> ActiveObjects
+ public override List<PhysicsActor> ActiveObjects
{
- get { return new List<AuroraODEPrim>(_activeprims).ConvertAll<PhysicsObject>(prim => prim); }
+ get { return new List<AuroraODEPrim>(_activeprims).ConvertAll<PhysicsActor>(prim => prim); }
}
public ConcurrentQueue<NoParam> SimulationChangesQueue = new ConcurrentQueue<NoParam>();
@@ -187,8 +186,8 @@ public override float StepTime
protected AuroraODERayCastRequestManager m_rayCastManager;
protected bool IsLocked;
- protected ConcurrentQueue<PhysicsObject> RemoveQueue = new ConcurrentQueue<PhysicsObject>();
- protected ConcurrentQueue<PhysicsObject> DeleteQueue = new ConcurrentQueue<PhysicsObject>();
+ protected ConcurrentQueue<PhysicsActor> RemoveQueue = new ConcurrentQueue<PhysicsActor>();
+ protected ConcurrentQueue<PhysicsActor> DeleteQueue = new ConcurrentQueue<PhysicsActor>();
internal float AvDecayTime = 0.95f;
@@ -610,8 +609,8 @@ private void near(IntPtr space, IntPtr g1, IntPtr g2)
// appears to be phantom for the world
// No collision on volume detect prims
- if ((p1 is PhysicsObject && ((PhysicsObject) p1).VolumeDetect) ||
- (p2 is PhysicsObject && ((PhysicsObject) p2).VolumeDetect))
+ if ((p1 is AuroraODEPrim && p1.VolumeDetect) ||
+ (p2 is AuroraODEPrim && p2.VolumeDetect))
return;
if (curContact.depth < 0f)
@@ -921,7 +920,7 @@ public void remCollisionEventReporting(PhysicsActor obj)
#region Add/Remove Entities
- public override PhysicsCharacter AddAvatar(string avName, Vector3 position, Quaternion rotation, Vector3 size,
+ public override PhysicsActor AddAvatar(string avName, Vector3 position, Quaternion rotation, Vector3 size,
bool isFlying, uint localID, UUID UUID)
{
Vector3 pos;
@@ -960,7 +959,7 @@ internal void RemoveCharacter(AuroraODECharacter chr)
_characters.Remove(chr);
}
- public override void RemoveAvatar(PhysicsCharacter actor)
+ public override void RemoveAvatar(PhysicsActor actor)
{
//MainConsole.Instance.Debug("[PHYSICS]:ODELOCK");
((AuroraODECharacter) actor).Destroy();
@@ -984,10 +983,12 @@ internal void BadPrim(AuroraODEPrim auroraODEPrim)
//AddPrimShape(auroraODEPrim.ParentEntity);
}
- public override PhysicsObject AddPrimShape(string name, byte physicsType, PrimitiveBaseShape shape, Vector3 position, Vector3 size, Quaternion rotation,
- bool isPhysical)
+ public override PhysicsActor AddPrimShape(UUID primID, uint localID, string name, byte physicsType, PrimitiveBaseShape shape, Vector3 position,
+ Vector3 size, Quaternion rotation, bool isPhysical)
{
AuroraODEPrim newPrim = new AuroraODEPrim(name, physicsType, shape, position, size, rotation, this);
+ newPrim.UUID = primID;
+ newPrim.LocalID = localID;
if (isPhysical)
newPrim.IsPhysical = isPhysical;
@@ -1020,13 +1021,13 @@ internal void remActivePrim(AuroraODEPrim deactivatePrim)
_activeprims.Remove(deactivatePrim);
}
- public override void RemovePrim(PhysicsObject prim)
+ public override void RemovePrim(PhysicsActor prim)
{
//Add the prim to a queue which will be removed when Simulate has finished what it's doing.
RemoveQueue.Enqueue(prim);
}
- public override void DeletePrim(PhysicsObject prim)
+ public override void DeletePrim(PhysicsActor prim)
{
//Add the prim to a queue which will be removed when Simulate has finished what it's doing.
DeleteQueue.Enqueue(prim);
@@ -1429,16 +1430,6 @@ public override void Simulate(float timeElapsed)
while (SimulationChangesQueue.TryDequeue(out del) && m_scene.ShouldRunHeartbeat)
try { del(); } catch { }
- if (SimulationChangesQueue.Count == 0 && !m_hasSetUpPrims)
- {
- //Tell the mesher that we are done with the initialization
- // of prim meshes and that it can clear it's in memory cache
- m_hasSetUpPrims = true;
- mesher.FinishedMeshing();
- }
- else if (!m_hasSetUpPrims)
- return; //Don't do physics until the sim is completely set up
-
// Move characters
foreach (
ODESpecificAvatar actor in _characters.Where(actor => actor != null).Cast<ODESpecificAvatar>())
@@ -1469,7 +1460,7 @@ public override void Simulate(float timeElapsed)
IsLocked = false;
- PhysicsObject prm;
+ PhysicsActor prm;
while (RemoveQueue.TryDequeue(out prm))
{
AuroraODEPrim p = (AuroraODEPrim) prm;
View
17 Aurora/Physics/AuroraOpenDynamicsEngine/AODEPrim.cs
@@ -48,14 +48,12 @@
using Aurora.Framework.Utilities;
using OpenMetaverse;
-//using Ode.NET;
-
namespace Aurora.Physics.AuroraOpenDynamicsEngine
{
/// <summary>
/// Various properties that ODE uses for AMotors but isn't exposed in ODE.NET so we must define them ourselves.
/// </summary>
- public class AuroraODEPrim : PhysicsObject
+ public class AuroraODEPrim : PhysicsActor
{
private const CollisionCategories m_default_collisionFlags = (CollisionCategories.Geom
| CollisionCategories.Space
@@ -79,7 +77,7 @@ public class AuroraODEPrim : PhysicsObject
private Vector3 _acceleration;
private float _mass; // prim or object mass
private Quaternion _orientation;
- private PhysicsObject _parent;
+ private PhysicsActor _parent;
private PrimitiveBaseShape _pbs;
private Vector3 _position;
private Vector3 _size;
@@ -219,7 +217,7 @@ public override bool BlockPhysicalReconstruction
}
}
- public PhysicsObject Parent
+ public PhysicsActor Parent
{
get { return _parent; }
}
@@ -2171,7 +2169,7 @@ public override void CrossingFailure()
}
}
- public override void link(PhysicsObject obj)
+ public override void link(PhysicsActor obj)
{
_parent_scene.AddSimulationChange(() => changelink((AuroraODEPrim) obj));
}
@@ -2339,16 +2337,17 @@ public override void AddCollisionEvent(uint CollidedWith, ContactPoint contact)
{
if (CollisionEventsThisFrame == null)
CollisionEventsThisFrame = new CollisionEventUpdate();
- CollisionEventsThisFrame.addCollider(CollidedWith, contact);
+ CollisionEventsThisFrame.AddCollider(CollidedWith, contact);
}
}
- public override void SendCollisions()
+ public override bool SendCollisions()
{
if (CollisionEventsThisFrame == null || m_frozen) //No collisions or frozen, don't mess with it
- return;
+ return false;
base.SendCollisionUpdate(CollisionEventsThisFrame.Copy());
CollisionEventsThisFrame = CollisionEventsThisFrame.Count == 0 ? null : new CollisionEventUpdate();
+ return true;
}
public override bool SubscribedEvents()
View
4 Aurora/Physics/AuroraOpenDynamicsEngine/ODESpecificAvatar.cs
@@ -11,7 +11,6 @@ public class ODESpecificAvatar : AuroraODECharacter
#region Declares
public d.Mass ShellMass;
- protected Vector3 _zeroPosition;
#endregion
@@ -48,9 +47,6 @@ public void Move(float timeStep)
// rex, added height check
- if (m_pidControllerActive == false)
- _zeroPosition = tempPos;
-
if (_parent_scene.m_useFlightCeilingHeight && tempPos.Z > _parent_scene.m_flightCeilingHeight)
{
tempPos.Z = _parent_scene.m_flightCeilingHeight;
View
10 Aurora/Physics/BasicPhysicsPlugin/BasicPhysicsActor.cs
@@ -30,7 +30,7 @@
namespace Aurora.Physics.BasicPhysicsPlugin
{
- public class BasicCharacterActor : PhysicsCharacter
+ public class BasicCharacterActor : PhysicsActor
{
private Vector3 _size;
@@ -137,16 +137,17 @@ public override bool SubscribedEvents()
return false;
}
- public override void SendCollisions()
+ public override bool SendCollisions()
{
+ return false;
}
public override void AddCollisionEvent(uint CollidedWith, ContactPoint contact)
{
}
}
- public class BasicObjectActor : PhysicsObject
+ public class BasicObjectActor : PhysicsActor
{
private Vector3 _size;
@@ -272,8 +273,9 @@ public override bool SubscribedEvents()
return false;
}
- public override void SendCollisions()
+ public override bool SendCollisions()
{
+ return false;
}
public override void AddCollisionEvent(uint CollidedWith, ContactPoint contact)
View
15 Aurora/Physics/BasicPhysicsPlugin/BasicPhysicsScene.cs
@@ -36,7 +36,7 @@ namespace Aurora.Physics.BasicPhysicsPlugin
{
public class BasicScene : PhysicsScene
{
- private readonly List<PhysicsCharacter> _actors = new List<PhysicsCharacter>();
+ private readonly List<PhysicsActor> _actors = new List<PhysicsActor>();
private short[] _heightMap;
private RegionInfo m_region;
@@ -68,23 +68,23 @@ public override void Dispose()
{
}
- public override PhysicsCharacter AddAvatar(string avName, Vector3 position, Quaternion rotation, Vector3 size,
+ public override PhysicsActor AddAvatar(string avName, Vector3 position, Quaternion rotation, Vector3 size,
bool isFlying, uint localID, UUID UUID)
{
BasicCharacterActor act = new BasicCharacterActor {Position = position, Flying = isFlying};
_actors.Add(act);
return act;
}
- public override void RemovePrim(PhysicsObject prim)
+ public override void RemovePrim(PhysicsActor prim)
{
}
- public override void DeletePrim(PhysicsObject prim)
+ public override void DeletePrim(PhysicsActor prim)
{
}
- public override void RemoveAvatar(PhysicsCharacter actor)
+ public override void RemoveAvatar(PhysicsActor actor)
{
BasicCharacterActor act = (BasicCharacterActor) actor;
if (_actors.Contains(act))
@@ -100,14 +100,15 @@ public override PhysicsActor AddPrim(Vector3 position, Vector3 size, Quaternion
}
*/
- public override PhysicsObject AddPrimShape(string name, byte physicsType, PrimitiveBaseShape shape, Vector3 position, Vector3 size, Quaternion rotation, bool isPhysical)
+ public override PhysicsActor AddPrimShape(UUID primID, uint localID, string name, byte physicsType, PrimitiveBaseShape shape,
+ Vector3 position, Vector3 size, Quaternion rotation, bool isPhysical)
{
return null;
}
public override void Simulate(float timeStep)
{
- foreach (PhysicsCharacter actor in _actors)
+ foreach (PhysicsActor actor in _actors)
{
Vector3 actorPosition = actor.Position;
Vector3 actorVelocity = actor.Velocity;
View
16 Aurora/Physics/Meshing/Mesh.cs
@@ -223,5 +223,21 @@ public void Deserialize(OSD cachedMesh)
new Coord(triangleArray[2].AsVector3())));
}*/
}
+
+
+ public int[] getIndexListAsInt()
+ {
+ throw new NotImplementedException();
+ }
+
+ public float[] getVertexListAsFloat()
+ {
+ throw new NotImplementedException();
+ }
+
+ public List<Vector3> getVertexList()
+ {
+ throw new NotImplementedException();
+ }
}
}
View
4 Aurora/Physics/Meshing/Meshmerizer.cs
@@ -611,10 +611,6 @@ private void ReportPrimError(string message, string primName, PrimMesh primMesh)
return mesh;
}
- public void FinishedMeshing()
- {
- }
-
public void RemoveMesh(ulong key)
{
}
View
4 Aurora/Physics/Meshing/ZeroMesher.cs
@@ -76,10 +76,6 @@ public void RemoveMesh(ulong key)
{
}
- public void FinishedMeshing()
- {
- }
-
#endregion
}
}
View
2 Aurora/Region/Animation/Animator.cs
@@ -221,7 +221,7 @@ public string GetMovementAnimation()
return "SIT_GROUND_CONSTRAINED";
}
AgentManager.ControlFlags controlFlags = (AgentManager.ControlFlags) m_scenePresence.AgentControlFlags;
- PhysicsCharacter actor = m_scenePresence.PhysicsActor;
+ PhysicsActor actor = m_scenePresence.PhysicsActor;
// Create forward and left vectors from the current avatar rotation
Vector3 fwd = Vector3.UnitX*m_scenePresence.Rotation;
View
2 Aurora/Region/AsyncScene.cs
@@ -631,7 +631,7 @@ public void StopPhysicsScene()
physicsState.SavePhysicsState();
//Then clear all the velocity and stuff on objects
- foreach (PhysicsObject o in PhysicsScene.ActiveObjects)
+ foreach (PhysicsActor o in PhysicsScene.ActiveObjects)
{
o.ClearVelocity();
o.RequestPhysicsterseUpdate();
View
2 Aurora/Region/Scene.cs
@@ -551,7 +551,7 @@ public void StopPhysicsScene()
physicsState.SavePhysicsState();
//Then clear all the velocity and stuff on objects
- foreach (PhysicsObject o in PhysicsScene.ActiveObjects)
+ foreach (PhysicsActor o in PhysicsScene.ActiveObjects)
{
o.ClearVelocity();
o.RequestPhysicsterseUpdate();
View
12 Aurora/Region/SceneObjectGroup.cs
@@ -2652,8 +2652,8 @@ public void RebuildPhysicalRepresentation(bool keepSelectedStatuses)
bool isPhantom = ((RootPart.Flags & PrimFlags.Phantom) != 0);
bool physical = isPhysical & !isPhantom;
- RootPart.PhysActor = m_scene.PhysicsScene.AddPrimShape(RootPart.Name, RootPart.PhysicsType, RootPart.Shape, RootPart.AbsolutePosition, RootPart.Scale,
- RootPart.GetWorldRotation(), physical);
+ RootPart.PhysActor = m_scene.PhysicsScene.AddPrimShape(RootPart.UUID, RootPart.LocalId, RootPart.Name, RootPart.PhysicsType,
+ RootPart.Shape, RootPart.AbsolutePosition, RootPart.Scale, RootPart.GetWorldRotation(), physical);
if (RootPart.PhysActor == null)
return;
// RootPart.PhysActor.BuildingRepresentation = true;
@@ -2704,8 +2704,8 @@ public void RebuildPhysicalRepresentation(bool keepSelectedStatuses)
isPhantom = ((part.ParentEntity.RootChild.Flags & PrimFlags.Phantom) != 0);
physical = isPhysical & !isPhantom;
- part.PhysActor = m_scene.PhysicsScene.AddPrimShape(part.Name, RootPart.PhysicsType, part.Shape, part.AbsolutePosition, part.Scale,
- part.GetWorldRotation(), physical);
+ part.PhysActor = m_scene.PhysicsScene.AddPrimShape(part.UUID, part.LocalId, part.Name, RootPart.PhysicsType,
+ part.Shape, part.AbsolutePosition, part.Scale, part.GetWorldRotation(), physical);
if (part.PhysActor == null)
continue;
// part.PhysActor.BuildingRepresentation = true;
@@ -4072,7 +4072,7 @@ public void UpdateGroupRotationR(Quaternion rot)
}
m_rootPart.UpdateRotation(rot);
- PhysicsObject actor = m_rootPart.PhysActor;
+ PhysicsActor actor = m_rootPart.PhysActor;
if (actor != null)
actor.Orientation = m_rootPart.GetRotationOffset();
@@ -4092,7 +4092,7 @@ public void UpdateGroupRotationPR(Vector3 pos, Quaternion rot)
}
m_rootPart.UpdateRotation(rot);
- PhysicsObject actor = m_rootPart.PhysActor;
+ PhysicsActor actor = m_rootPart.PhysActor;
if (actor != null)
actor.Orientation = m_rootPart.GetRotationOffset();
View
22 Aurora/Region/SceneObjectPart.cs
@@ -180,7 +180,7 @@ public void SetConeOfSilence(double radius)
protected byte[] m_particleSystem = Utils.EmptyBytes;
private int m_passTouches;
- private PhysicsObject m_physActor;
+ private PhysicsActor m_physActor;
private bool m_pidActive;
private bool m_pidhoverActive;
private UndoStack<UndoState> m_redo = new UndoStack<UndoState>(5);
@@ -294,7 +294,7 @@ public int[] PayPrice
}
[XmlIgnore]
- public PhysicsObject PhysActor
+ public PhysicsActor PhysActor
{
get { return m_physActor; }
set
@@ -897,7 +897,7 @@ public Vector3 GroupPosition
public Vector3 GetGroupPosition()
{
// If this is a linkset, we don't want the physics engine mucking up our group position here.
- PhysicsObject actor = PhysActor;
+ PhysicsActor actor = PhysActor;
if (actor != null && _parentID == 0)
{
m_groupPosition = actor.Position;
@@ -929,7 +929,7 @@ public Vector3 OffsetPosition
public Quaternion GetRotationOffset()
{
- PhysicsObject actor = m_physActor;
+ PhysicsActor actor = m_physActor;
if (_parentID == 0 && (m_shape.PCode != 9 || m_shape.State == 0) && actor != null)
{
if (actor.Orientation.X != 0f || actor.Orientation.Y != 0f
@@ -950,7 +950,7 @@ public Vector3 Velocity
{
get
{
- PhysicsObject actor = PhysActor;
+ PhysicsActor actor = PhysActor;
if (actor != null)
{
if (actor.IsPhysical)
@@ -964,7 +964,7 @@ public Vector3 Velocity
set
{
- PhysicsObject actor = PhysActor;
+ PhysicsActor actor = PhysActor;
if (actor != null)
{
if (actor.IsPhysical)
@@ -987,7 +987,7 @@ public Vector3 AngularVelocity
{
get
{
- PhysicsObject actor = PhysActor;
+ PhysicsActor actor = PhysActor;
if ((actor != null) && actor.IsPhysical)
{
m_angularVelocity = actor.RotationalVelocity;
@@ -1753,7 +1753,7 @@ public void FixOffsetPosition(Vector3 value, bool single)
if (ParentGroup != null && !ParentGroup.IsDeleted)
{
ParentGroup.HasGroupChanged = true;
- PhysicsObject actor = PhysActor;
+ PhysicsActor actor = PhysActor;
if (_parentID != 0 && actor != null && (single || !actor.IsPhysical))
{
actor.Position = GetWorldPosition();
@@ -3279,7 +3279,7 @@ public void UpdateOffSet(Vector3 pos)
{
// Remove VolumeDetect in any case. Note, it's safe to call SetVolumeDetect as often as you like
// (mumbles, well, at least if you have infinte CPU powers :-))
- PhysicsObject pa = this.PhysActor;
+ PhysicsActor pa = this.PhysActor;
if (pa != null)
PhysActor.VolumeDetect = false;
@@ -3573,7 +3573,7 @@ public void SetRotationOffset(bool UpdatePrimActor, Quaternion value, bool singl
RotationOffset = value;
- PhysicsObject actor = PhysActor;
+ PhysicsActor actor = PhysActor;
if (actor != null)
{
if (value.W == 0) //We have an issue here... try to normalize it
@@ -3639,7 +3639,7 @@ public void FixGroupPositionComum(bool UpdatePrimActor, Vector3 value, bool sing
m_groupPosition = value;
- PhysicsObject actor = PhysActor;
+ PhysicsActor actor = PhysActor;
if (actor != null)
{
View
14 Aurora/Region/ScenePresence.cs
@@ -243,7 +243,7 @@ private enum Dir_ControlFlags
/// <summary>
/// Physical scene representation of this Avatar.
/// </summary>
- public PhysicsCharacter PhysicsActor
+ public PhysicsActor PhysicsActor
{
get { return m_physicsActor; }
set { m_physicsActor = value; }
@@ -420,7 +420,7 @@ public uint AgentControlFlags
/// </summary>
private readonly IClientAPI m_controllingClient;
- protected PhysicsCharacter m_physicsActor;
+ protected PhysicsActor m_physicsActor;
/// <value>
/// The client controlling this presence
@@ -446,7 +446,7 @@ public override sealed Vector3 AbsolutePosition
get { return GetAbsolutePosition(); }
set
{
- PhysicsCharacter actor = m_physicsActor;
+ PhysicsActor actor = m_physicsActor;
if (actor != null)
{
try
@@ -515,7 +515,7 @@ public override Vector3 Velocity
{
get
{
- PhysicsCharacter actor = m_physicsActor;
+ PhysicsActor actor = m_physicsActor;
if (actor != null)
return actor.Velocity;
@@ -525,7 +525,7 @@ public override Vector3 Velocity
}
set
{
- PhysicsCharacter actor = m_physicsActor;
+ PhysicsActor actor = m_physicsActor;
if (actor != null)
{
try
@@ -1224,7 +1224,7 @@ public virtual void HandleAgentUpdate(IClientAPI remoteClient, AgentUpdateArgs a
m_headrotation = agentData.HeadRotation;
m_state = agentData.State;
- PhysicsCharacter actor = PhysicsActor;
+ PhysicsActor actor = PhysicsActor;
if (actor == null)
{
//This happens while sitting, don't spam it
@@ -2057,7 +2057,7 @@ public void AddNewMovement(Vector3 vec, Quaternion rotation)
return;
}
- PhysicsCharacter actor = m_physicsActor;
+ PhysicsActor actor = m_physicsActor;
if (actor != null)
{
Vector3 direc = (rotation == Quaternion.Identity ? vec : (vec*rotation));

0 comments on commit a9d95dd

Please sign in to comment.