mirror of
https://github.com/opensim/opensim.git
synced 2026-08-05 00:46:02 +08:00
* Added more spinning parts to ComplexObject.
* We now have CylinderShape * This commit dedicated to the birth of techno house.
This commit is contained in:
@@ -14,11 +14,12 @@ namespace SimpleApp
|
||||
|
||||
private class RotatingWheel : SceneObjectPart
|
||||
{
|
||||
private static LLQuaternion m_rotationDirection = new LLQuaternion(0.05f, 0, 0);
|
||||
private LLQuaternion m_rotationDirection;
|
||||
|
||||
public RotatingWheel(ulong regionHandle, SceneObjectGroup parent, LLUUID ownerID, uint localID, LLVector3 groupPosition, LLVector3 offsetPosition)
|
||||
: base(regionHandle, parent, ownerID, localID, BoxShape.Default, groupPosition, offsetPosition )
|
||||
public RotatingWheel(ulong regionHandle, SceneObjectGroup parent, LLUUID ownerID, uint localID, LLVector3 groupPosition, LLVector3 offsetPosition, LLQuaternion rotationDirection)
|
||||
: base(regionHandle, parent, ownerID, localID, new CylinderShape( 0.5f, 0.2f ), groupPosition, offsetPosition )
|
||||
{
|
||||
m_rotationDirection = rotationDirection;
|
||||
}
|
||||
|
||||
public override void UpdateMovement()
|
||||
@@ -38,10 +39,16 @@ namespace SimpleApp
|
||||
: base(scene, regionHandle, ownerID, localID, pos, BoxShape.Default )
|
||||
{
|
||||
m_rotationDirection = new LLQuaternion(0.05f, 0.1f, 0.15f);
|
||||
|
||||
AddPart(new RotatingWheel(regionHandle, this, ownerID, scene.PrimIDAllocate(), pos, new LLVector3(0, 0, 1f)));
|
||||
AddPart(new RotatingWheel(regionHandle, this, ownerID, scene.PrimIDAllocate(), pos, new LLVector3(0, 0, -1f)));
|
||||
|
||||
AddPart(new RotatingWheel(regionHandle, this, ownerID, scene.PrimIDAllocate(), pos, new LLVector3(0, 0, 0.75f), new LLQuaternion(0.05f,0,0)));
|
||||
AddPart(new RotatingWheel(regionHandle, this, ownerID, scene.PrimIDAllocate(), pos, new LLVector3(0, 0, -0.75f), new LLQuaternion(-0.05f,0,0)));
|
||||
|
||||
AddPart(new RotatingWheel(regionHandle, this, ownerID, scene.PrimIDAllocate(), pos, new LLVector3(0, 0.75f,0), new LLQuaternion(0.5f, 0, 0.05f)));
|
||||
AddPart(new RotatingWheel(regionHandle, this, ownerID, scene.PrimIDAllocate(), pos, new LLVector3(0, -0.75f,0), new LLQuaternion(-0.5f, 0, -0.05f)));
|
||||
|
||||
AddPart(new RotatingWheel(regionHandle, this, ownerID, scene.PrimIDAllocate(), pos, new LLVector3(0.75f, 0, 0), new LLQuaternion(0, 0.5f, 0.05f)));
|
||||
AddPart(new RotatingWheel(regionHandle, this, ownerID, scene.PrimIDAllocate(), pos, new LLVector3(-0.75f, 0, 0), new LLQuaternion(0, -0.5f, -0.05f)));
|
||||
|
||||
UpdateParentIDs();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user