private void AddToScene() { string sceneName = WorldEditor.GetUniqueName(name, "Particle System"); particleSystem = ParticleSystemManager.Instance.CreateSystem(sceneName, particleSystemName); particleSystem.ScaleVelocity(velocityScale); baseHeight = particleSystem.DefaultHeight; baseWidth = particleSystem.DefaultWidth; ParticleScale = particleScale; if (attached) { Axiom.Animating.AttachmentPoint attachmentPoint = displayObject.GetAttachmentPoint(attachmentPointName); if (attachmentPoint == null) { attachmentPoint = new Axiom.Animating.AttachmentPoint(attachmentPointName, null, Quaternion.Identity, Vector3.Zero); } if (attachmentPoint.ParentBone != null) { tagPoint = displayObject.Entity.AttachObjectToBone(attachmentPoint.ParentBone, particleSystem, attachmentPoint.Orientation, attachmentPoint.Position); node = null; } else { node = scene.CreateSceneNode(); node.Position = attachmentPoint.Position; node.Orientation = attachmentPoint.Orientation; displayObject.SceneNode.AddChild(node); node.AttachObject(particleSystem); } } else { node = scene.RootSceneNode.CreateChildSceneNode(); node.AttachObject(particleSystem); node.Position = position; node.ScaleFactor = scale; node.Orientation = Quaternion.FromAngleAxis(rotation.y * MathUtil.RADIANS_PER_DEGREE, Vector3.UnitY); } }