mirror of
https://github.com/opensim/opensim.git
synced 2026-08-13 05:05:43 +08:00
move ugly convertion of axis locks 3 bit flags to a wasted vector3 down to PhysicsActor. Let engines use LockAngularMotion with either Vector3 argument or byte
This commit is contained in:
@@ -230,7 +230,20 @@ namespace OpenSim.Region.PhysicsModules.SharedBase
|
||||
|
||||
public abstract void delink();
|
||||
|
||||
public abstract void LockAngularMotion(Vector3 axis);
|
||||
public virtual void LockAngularMotion(Vector3 axis) { }
|
||||
|
||||
public virtual void LockAngularMotion(byte axislocks)
|
||||
{
|
||||
Vector3 lrRotationAxis = Vector3.One;
|
||||
if((axislocks & 0x02) != 0 )
|
||||
lrRotationAxis.X = 0f;
|
||||
if((axislocks & 0x04) != 0 )
|
||||
lrRotationAxis.Y = 0f;
|
||||
if((axislocks & 0x08) != 0 )
|
||||
lrRotationAxis.Z = 0f;
|
||||
|
||||
LockAngularMotion(lrRotationAxis);
|
||||
}
|
||||
|
||||
public virtual void RequestPhysicsterseUpdate()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user