• Home
  • Guides
  • API Documentation
WLT documentation has moved.

We are publishing both conceptual docs and API references on docs.microsoft.com. For conceptual docs, please visit our new landing page. For API references, please visit the Core WLT section of the dot net API explorer and related pages. Existing content will remain here but will not be updated further.

  • API Documentation
  • Reference
  • Microsoft.MixedReality.WorldLocking.Examples
  • PhysicsBeamSample
Search Results for

    Show / Hide Table of Contents
    • Reference
      • Microsoft.MixedReality.WorldLocking.ASA
        • IBinder
        • IBindingOracle
        • ILocalPeg
        • IPublisher
        • LocalPegAndProperties
        • PublisherASA
        • PublisherReadiness
        • ReadinessStatus
        • SpacePinASA
        • SpacePinASA.KeyValPair
        • SpacePinBinder
        • SpacePinBinderFile
        • SpacePinCloudBinding
      • Microsoft.MixedReality.WorldLocking.ASA.Examples
        • ActionCube
        • ActionPublish
        • PlatformMenuSelector
        • ScreenSpacer
        • SpacePinASAManipulation
        • Startup
      • Microsoft.MixedReality.WorldLocking.Core
        • AdjustLocationDelegate
        • AdjustStateDelegate
        • AlignmentManager
        • AlignSubtree
        • AnchorManager
        • AnchorManager.SpongyAnchorWithId
        • AnchorManagerARCore
        • AnchorManagerNull
        • AnchorManagerWSA
        • AnchorSettings
        • AnchorSettings.AnchorSubsystem
        • AttachmentPoint
        • AttachmentPointStateType
        • Diagnostics
        • Diagnostics.Record
        • DiagnosticsSettings
        • Fragment
        • HeadPoseTrackerCamera
        • HeadPoseTrackerXR
        • IAlignmentManager
        • IAnchorManager
        • IAttachmentPoint
        • IAttachmentPointManager
        • IFragmentManager
        • IHeadPoseTracker
        • IOrientable
        • IOrienter
        • LinkageSettings
        • ManagerSettings
        • Orienter
        • Orienter.WeightedRotation
        • OrienterThreeBody
        • PoseExtensions
        • PostAlignmentLoadedDelegate
        • RefitNotificationDelegate
        • ResourceMirror
        • ResourceMirror.CompareToResource<ItemType, ResourceType>
        • ResourceMirror.CreateResource<ItemType, ResourceType>
        • ResourceMirror.DestroyResource<ResourceType>
        • ResourceMirror.UpdateResource<ItemType, ResourceType>
        • SharedDiagnosticsSettings
        • SharedManagerSettings
        • SpacePin
        • SpacePin.ModelPositionSourceEnum
        • SpacePinOrientable
        • SpongyAnchor
        • SpongyAnchorARCore
        • SpongyAnchorARF
        • SpongyAnchorNull
        • SpongyAnchorWSA
        • SpongyAnchorXR
        • TransformExtensions
        • WorldLockingContext
        • WorldLockingManager
      • Microsoft.MixedReality.WorldLocking.Core.ResourceMirrorHelper
        • IdPair<IdType, T>
      • Microsoft.MixedReality.WorldLocking.Core.Triangulator
        • Interpolant
        • ITriangulator
        • SimpleTriangulator
      • Microsoft.MixedReality.WorldLocking.Examples
        • AlignmentControl
        • CircleCam
        • DashboardCommand
        • DashboardUI
        • FallOut
        • ManipulationEndedDelegate
        • ManipulationStartedDelegate
        • PhysicsBeamSample
        • PinManipulator
        • RayPins
        • SpacePinManipulation
        • SpacePinOrientableManipulation
      • Microsoft.MixedReality.WorldLocking.Tools
        • AdjusterBase
        • AdjusterFixed
        • AdjusterMoving
        • AnchorGraphVisual
        • ConnectingLine
        • FrameVisual
        • FrozenAnchorVisual
        • FrozenSpatialMapping
        • FrozenSpatialMapping.QualityType
        • FrozenTapToAdd
        • SimpleConsole
        • SimpleSprite
        • SpacePinMeshVisualizer
        • SpacePinPercentageVisualizer
        • SpongyAnchorVisual
        • StatusToText
        • ToggleWorldAnchor
        • WorldAnchorAdapter
        • WorldLockingSetup

    Class PhysicsBeamSample

    Example component using Frozen World to facilitate physics simulation.

    Inheritance
    Object
    PhysicsBeamSample
    Implements
    IMixedRealityPointerHandler
    Namespace: Microsoft.MixedReality.WorldLocking.Examples
    Assembly: cs.temp.dll.dll
    Syntax
    public class PhysicsBeamSample : InputSystemGlobalHandlerListener
    Remarks

    This MRTK based component uses MRTK for inputs to abstract out device.

    In all modes, the ray cast intersection as reported by MRTK is further filtered to specifically exclude UI elements. Along with collidable objects in the scene, a collidable spatial map is also included as ray cast target. The "hit point" is the intersection of the currently active pointer ray with those collidables, along with information about that object and the intersection (e.g. surface normal at hit point). If there is no current hit point, after excluding UI elements, no operation is performed.

    The component itself has 5 modes of operation:

    1. Idle - ignore inputs, do nothing
    2. Throw darts - compute and display an ballistic arc to toss a physics rigid body at the current hit point.
    3. Place pillar - Place an upright pillar at hit point. If the hit object is not a beam or pillar (e.g. is the spatial map), then a static pillar is added, else a physically simulated pillar.
    4. Place beam - A two part operation. The first select of a hit point establishes the first end point of a beam, and the second hit point the other beam's end point. A physically simulated beam stretched to have those two endpoints is generated and added to the scene.
    5. Remove object - Clicking on an object added to the scene in one of the above modes will remove it from the scene.

    Mode selection is done via the MRTK radio buttons (see Microsoft.MixedReality.Toolkit.UI.InteractableToggleCollection) included in the scene as an addition to the dashboard.

    Properties

    AttachRoot

    The subroot to attach created objects to.

    Declaration
    public Transform AttachRoot { get; }
    Property Value
    Type Description
    Transform

    LineMaterial

    Material to use when rendering line for beam placement.

    Declaration
    public Material LineMaterial { get; }
    Property Value
    Type Description
    Material

    PrefabBeam

    The prefab of the beam to place in the world at gaze position on air taps.

    Declaration
    public GameObject PrefabBeam { get; }
    Property Value
    Type Description
    GameObject

    PrefabDart

    The prefab of the dart to place in the world at gaze position on air taps.

    Declaration
    public GameObject PrefabDart { get; }
    Property Value
    Type Description
    GameObject

    PrefabHybridLockedSphere

    The prefab of the hybrid-locked 'sphere' to place in the world at gaze position on air taps in Pin Sphere Mode.

    Declaration
    public GameObject PrefabHybridLockedSphere { get; }
    Property Value
    Type Description
    GameObject

    PrefabPillarDynamic

    The prefab of dynamic pillars to place in the world at gaze position on air taps.

    Declaration
    public GameObject PrefabPillarDynamic { get; }
    Property Value
    Type Description
    GameObject

    PrefabPillarFixed

    The prefab of fixed pillars to place in the world at gaze position on air taps.

    Declaration
    public GameObject PrefabPillarFixed { get; }
    Property Value
    Type Description
    GameObject

    PrefabUnlockedSphere

    The prefab of the non-locked 'sphere' to place in the world at gaze position on air taps in Pin Sphere Mode.

    Declaration
    public GameObject PrefabUnlockedSphere { get; }
    Property Value
    Type Description
    GameObject

    PrefabWorldLockedSphere

    The prefab of the world-locked 'sphere' to place in the world at gaze position on air taps in Pin Sphere Mode.

    Declaration
    public GameObject PrefabWorldLockedSphere { get; }
    Property Value
    Type Description
    GameObject

    Methods

    EnterBeamMode()

    Switch into cross-beam placement mode.

    Declaration
    public void EnterBeamMode()

    EnterDartMode()

    Switch into dart tossing mode.

    Declaration
    public void EnterDartMode()

    EnterIdleMode()

    Switch into idle mode.

    Declaration
    public void EnterIdleMode()

    EnterPillarMode()

    Switch into pillar placement mode.

    Declaration
    public void EnterPillarMode()

    EnterPinSphereMode()

    Declaration
    public void EnterPinSphereMode()

    EnterRemoveMode()

    Switch into object removal mode.

    Declaration
    public void EnterRemoveMode()

    EnterWorldLockHybridLocked()

    Declaration
    public void EnterWorldLockHybridLocked()

    EnterWorldLockUnlocked()

    Declaration
    public void EnterWorldLockUnlocked()

    EnterWorldLockWorldLocked()

    Declaration
    public void EnterWorldLockWorldLocked()

    OnPointerClicked(MixedRealityPointerEventData)

    Process pointer clicked event if ray cast has result.

    Declaration
    public void OnPointerClicked(MixedRealityPointerEventData eventData)
    Parameters
    Type Name Description
    MixedRealityPointerEventData eventData

    OnPointerDown(MixedRealityPointerEventData)

    No-op on pointer down.

    Declaration
    public void OnPointerDown(MixedRealityPointerEventData eventData)
    Parameters
    Type Name Description
    MixedRealityPointerEventData eventData

    OnPointerDragged(MixedRealityPointerEventData)

    No-op on pointer drag.

    Declaration
    public void OnPointerDragged(MixedRealityPointerEventData eventData)
    Parameters
    Type Name Description
    MixedRealityPointerEventData eventData

    OnPointerUp(MixedRealityPointerEventData)

    No-op on pointer up.

    Declaration
    public void OnPointerUp(MixedRealityPointerEventData eventData)
    Parameters
    Type Name Description
    MixedRealityPointerEventData eventData

    RegisterHandlers()

    Declaration
    protected override void RegisterHandlers()

    Start()

    Override InputSystemGlobalListener Start() method for additional one-time setup.

    Declaration
    protected override void Start()

    UnregisterHandlers()

    Declaration
    protected override void UnregisterHandlers()

    Implements

    IMixedRealityPointerHandler
    In This Article
    • Properties
      • AttachRoot
      • LineMaterial
      • PrefabBeam
      • PrefabDart
      • PrefabHybridLockedSphere
      • PrefabPillarDynamic
      • PrefabPillarFixed
      • PrefabUnlockedSphere
      • PrefabWorldLockedSphere
    • Methods
      • EnterBeamMode()
      • EnterDartMode()
      • EnterIdleMode()
      • EnterPillarMode()
      • EnterPinSphereMode()
      • EnterRemoveMode()
      • EnterWorldLockHybridLocked()
      • EnterWorldLockUnlocked()
      • EnterWorldLockWorldLocked()
      • OnPointerClicked(MixedRealityPointerEventData)
      • OnPointerDown(MixedRealityPointerEventData)
      • OnPointerDragged(MixedRealityPointerEventData)
      • OnPointerUp(MixedRealityPointerEventData)
      • RegisterHandlers()
      • Start()
      • UnregisterHandlers()
    • Implements
    Back to top Generated by DocFX