docs.unity.cn
  • Manual
  • Scripting API
  • Changelog
  • License

Unity MARS 1.4.1

    Show / Hide Table of Contents
    • Unity MARS Overview
      • Introduction
      • Requirements
    • Step by Step guide for building to devices with Unity MARS
      • Installing MARS on a new project
      • Preparing Unity for making builds for Android or i​OS
        • i​OS-specific project setup for building with Unity MARS
        • Android-specific project setup for building with Unity MARS
        • Preparing Unity for making builds for Holo​Lens 2
        • Creating a scene for testing on a build
        • Building your project to your selected platform
    • Getting started
      • Quick installation overview
      • Creating your app
        • Overview of the Unity MARS UI
        • Setting up the MARS Device and Simulation views
        • Setting up your first Proxy
        • Adding content to your rule
        • Adding a plane size condition
        • Testing your app in a simulated environment
        • Building your app
        • Additional features
    • Unity MARS UI overview
      • Overview of the Unity MARS UI
      • MARS panel
        • Create
        • Simulation Controls
        • Content Hierarchy
        • Environment Hierarchy
      • Simulation view
      • Device view
        • Recording from the Device View
      • Simulation Test Runner
      • Simulation settings
      • MARS Templates
      • MARS Game​Object menu
    • Unity MARS concepts
      • Proxy
      • Proxy Groups
      • Replicators
      • Proxy Forces
      • Synthetic Objects and Simulation View
      • The MARS Database
      • The MARS Session and the Camera
    • Working with Unity MARS
      • Tips for authoring AR content with Unity MARS
      • Creating a proxy
        • Attaching content to a proxy
        • Aligning content to a proxy
        • Creating a Proxy automatically from simulated data (Create Tool.​md)
        • Debugging a Proxy against simulation data (Compare Tool.​md)
        • Using synthetic data to place content
      • Creating proxy groups
      • Using a replicator to place content on multiple surfaces
      • Scaling AR content with World Scale
      • Scene evaluation
    • Rules
      • Getting started with Rules
        • Changing match count
        • Changing Proxy type
        • Adding actions
      • Proxy Groups
        • Converting a Proxy to a Group
      • Landmarks
      • Working with the backing objects
    • Face Tracking
      • Using a facemask template
        • Loading custom recorded videos
      • Placing digital content on a face
      • Testing face tracking on Unity MARS
      • Face tracking considerations
    • Body Tracking
      • Body Tracking in Unity MARS
        • Creating a Body Proxy
        • Preparing the Body Proxy
        • Body landmarks
        • Matching body poses
          • The Body Pose tool
            • Creating poses
            • Loading poses
            • Body pose data
              • Modifying poses
          • Final thoughts
        • Synthetic bodies
        • Body tracking example
          • Extracting a pose from an animation
          • Testing the extracted pose in the Simulation view
          • Building and testing tracked poses
    • Image Marker Tracking
      • Marker tracking
      • Creating a marker library
      • Using marker libraries
      • Marker conditions
      • Visualizing image markers
      • Simulating image markers
        • Adding synthetic markers to environments
        • Manipulating synthetic image markers
      • Putting it together
    • Simulation environments
      • Searching available environments
      • Anatomy of a simulation environment
        • Generating synthetic planes
          • Extracting planes automatically for the environment
          • Saving planes from a simulation walkthrough
      • Creating a simulated environment
        • Adding a new simulation environment to MARS
        • Testing the created simulation environment
    • Landmarks
      • Adding landmarks to MARS objects
        • Landmarks on planes
        • Landmarks on faces
        • Landmarks on bodies
        • Other types of landmarks
      • Landmark scripts
        • Landmark​Controller
        • Landmark​Output
        • Landmark​Settings
        • Landmark​Source
      • Defining custom landmarks
        • Create a landmark source
        • Creating a landmark output
        • Creating landmark settings
    • Traits
      • Semantic tags
      • Standard traits
      • Adding trait requirements to Proxies
      • Adding trait requirements via scripts
      • Providing traits via scripts
      • Custom trait types
        • Example
        • Adding your type
    • Proxy forces
      • Force components
      • Examples
        • Getting started: Making an avatar look towards you from a surface
          • Setting up a proxy (before adding forces.​md)
          • Adding forces to the proxy
          • Testing created forces
          • Conclusions
        • Example: Dinner for two using forces
          • Set up the basic scene environment
          • Organize the dishes
          • Configure settings for all the cutlery
          • Conclusions
          • Troubleshooting this example
        • Using forces without Proxies
        • Important considerations regarding Proxy forces
        • Troubleshooting / FAQ
    • Software development guide
      • Package contents
      • Software developer topics
        • Generate all .​csproj files
        • MARS Session
        • Functionality Injection
        • Functionality islands
        • Module Loader
          • Reload Modules
        • MARS Database
          • MARSBackend - read
          • Synthetic Objects - write
          • Reasoning APIs - read and write
        • Queries
          • Common query data
          • Exclusivity
        • Proxy Group queries
          • Required child Proxies
        • Writing Conditions
        • Writing Multi​Conditions
        • Writing Relations
        • Writing Multi​Relations
        • Writing Actions
        • Populating the MARSEntity inspector with your classes
        • Synthetic Data
          • Writing a Synthesized​Trait
        • Reasoning APIs
          • Selection criteria for Reasoning APIs
          • Writing Reasoning APIs
        • Providers
          • How a provider is selected
        • Writing behaviors compatible with Simulation
          • MARS Time
          • Finding the Camera
        • MARS Editor Systems
          • Data Visuals
    • Graphics
      • Composite Render
        • Composite Render Options
      • Supported Rendering Modes
      • Post Processing
      • AR Background Setup in Unity MARS
        • Configuring ARCamera​Background with the Universal Render Pipeline
      • Universal Render Pipeline
    • Working with AR Foundation and the MARS XR simulation subsystem
    • MARS Components Reference Guide
      • Conditions
      • Traits
      • Actions
      • Forces
      • Visualizers
      • Synthetic Data
      • Simulation Environment
    • Project Settings
      • Project Validation
    • FAQ
    • Glossary
    • Privacy & Legal Info
    • Manual
    • Working with Unity MARS
    • Creating a proxy
    • Creating a Proxy automatically from simulated data (Create Tool.​md)
    • Debugging a Proxy against simulation data (Compare Tool.​md)
    • MARS Components Reference Guide
    • Forces

    Forces reference guide

    Proxy forces allow you to express a web of flexible spring-like forces that pull your proxy into its final position. For more information about proxy forces you can jump to the forces section.

    Below are the key concepts, types, and main properties that the Proxy forces system uses.

    Forces (ProxyForces)

    ProxyForces

    Collects and applies the forces below onto this object. One per GameObject. If you enabled the Require Forces* option, set forces to act as starting conditions to filter out invalid starting states.

    Alignment (ProxyAlignmentForce)

    ProxyAlignmentForces

    Applies a force that aligns this object relative to another object. This supports multiple target relations. Depending on the purpose of your application, they work as follows:

    Target Relation Description
    Move To And Align With Moves and rotates to align with the target object.
    Move To And Face Moves to the target object and faces it (faces towards the Z axis).
    Center In Front Of And Face Moves in front of the object and faces it (faces towards the Z axis), regardless of distance.
    Scene Initial Relative Pose Saves the initial alignment (in the scene) from the target to this object, and applies a force to regain that alignment.
    Scene Initial Relative Angle Saves the initial angle (in the scene) from the target to this object, and applies a force to regain that angle.

    Scale forces control the amount of force applied towards the goal pose. Set this value to 0 to make the force have no effect and 1 to apply the full force.

    Region - Occupancy (ProxyRegionForceOccupancy)

    Describes how the object occupies space and applies a force to keep it from colliding with other occupied spaces. By default, Unity MARS assigns a unit cube to the region transform and creates this cube as a child of the Proxy. This transform defines the region's shape and pose.

    ProxyRegionForceOccupancy

    Note: Because Proxy forces don't depend on Unity's physics system, if you want to change the region transform of any Proxy force, you only have to change the scale of the transform assigned in the Region Transform object field.

    Padding regions are used to model empty/negative space around the object. They can overlap with other paddings but will collide with occupied regions. If you enable the Is Padding option, the Proxy will avoid occupied regions, but will allow overlap with other padded areas.

    Region - Towards (ProxyRegionForceTowards)

    ProxyRegionForceTowards

    Describes a region that is attracted towards other objects (an attach-shape or snap-point). A "towards" region is often used to describe parts of objects that should be in contact with a surface such as a wall, the floor, or both.

    You can configure this force using the following parameters:

    Parameter Description
    Towards Layers Filters the attraction to only the selected layers.
    Towards Alignment Filters the attraction to the set alignment (vertical, horizontal up, etc.)
    Towards Edge Only Attraction can be only towards the edge of the object. This is useful when defining corner alignments, for example.
    Region Transform Describes the shape of the attachment or attraction region relative to the proxy.

    Region - Plane2D (ProxyRegionForcePlane2D)

    ProxyRegionForcePlane2D

    Describes a flat 2D region at the object origin that is attracted towards other planes and provides a way to automatically pull the size and alignment of this region from other Conditions on the Proxy.

    You can configure this force using the following parameters:

    Parameter Description
    Keep Match Plane When enabled within a plane proxy, only is attracted to the matched plane.
    Use Plane Size Condition When enabled, gets the region size from a plane size condition available at start.
    Use Alignment Condition When enabled, gets the region's alignment from an alignment condition available at start.
    Plane Size Size of the 2D plane in X and Y/Z axes (can automatically pull from an associated plane size condition).
    Plane Alignment Defines which planes to align with, like only horizontal up (can automatically pull from an associated alignment condition).
    In This Article
    • Forces (ProxyForces)
    • Alignment (ProxyAlignmentForce)
    • Region - Occupancy (ProxyRegionForceOccupancy)
    • Region - Towards (ProxyRegionForceTowards)
    • Region - Plane2D (ProxyRegionForcePlane2D)
    Back to top
    Terms of use
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023