public static SceneNode DrawLine(SceneManager mSceneMgr, Vector3 start, Vector3 end) { ManualObject line = mSceneMgr.CreateManualObject("line" + numLines); SceneNode lineNode = mSceneMgr.RootSceneNode.CreateChildSceneNode("line" + numLines + "_node"); MaterialPtr lineMaterial = MaterialManager.Singleton.Create("line" + numLines + "_material", "Default"); lineMaterial.ReceiveShadows = false; lineMaterial.SetLightingEnabled(true); lineMaterial.SetDiffuse(LineColour.r, LineColour.g, LineColour.b, 0); lineMaterial.SetAmbient(LineColour.r, LineColour.g, LineColour.b); lineMaterial.SetSelfIllumination(LineColour.r, LineColour.g, LineColour.b); line.Begin("line" + numLines + "_material", RenderOperation.OperationTypes.OT_LINE_LIST); line.Position(start); line.Position(end); line.End(); lineNode.AttachObject(line); ++numLines; return(lineNode); }