One of the systems I’m most proud of in MARS is “Proxy Forces” for realtime dynamic placement of objects (combines springs and signed-distance-fields to bring objects into alignment with each other). You can find documentation and a video below. Glad to answer any questions, it is a new paradigm but hopefully really helps with the ergonomic aspects of AR interaction with the world.
Here’s a quick question on proxy forces. would I be able to use them to say snap planes at a given y height, to match the extents of a rooms wall ? So as to be able to generate a kind of floor plan ?
(Love this entire toolset so far)
Hey @Jon-at-Kaio_1 ,
Yes you definitely could, sounds like you want to start with a vertical proxy then add a “Snap to Horizontal Surface” region pretty far below your object (and a “Snap to Vertical Surface” just behind it). That way you can tune the wall and floor distances separately.
Hey @Jon-at-Kaio_1 , here is a picture of the inspector setup. Easiest way to make this is via the MARS menus/inspectors: Vertical Proxy, then Forces / Snap to Vertical and Snap to Horizontal.
can I somehow use this system to first snap to an image marker, then make it so the objects (once spawned) would have their alignment be based on the world understanding capabilities of ArKit4?
@juliannorum yes! The trick is to disable a couple of things:
On the “SetPoseAction” uncheck “Follow Match Updates” (so that if the marker placement updates, the object won’t move with it)
If you used a “ProxyRegionForcePlane2D” to keep the object on a surface, then uncheck “KeepMatchPlane” so that it will try to position itself onto any plane (not just the initial matched plane).
I’m trying to get an object to snap to the intersection of a floor and a wall. I add a Vertical Plane Proxy and a prefab as its child. I try to add a force: Add Force → Snap to Horizontal Surfaces. The editor briefly flashes a component “Proxy Region Force Towards” in the inspector and a “Region Towards HorizontalUp” GameObject in the Content Hierarchy. These then disappear. I repeat the same process. This time the Component and the GameObject remain but as soon as I press Start Simulation they again disappear.
This happens in both MARS 1.0 and 1.1 - what is going wrong?
@zerozerozero , so you do want to add the two “Snap to Vertical Surfaces” and “Snap to Horizontal Surfaces” preset Forces (which are both “Proxy Region Force Towards” components in the Inspector, but with the “Towards Alignment” configured differently for each, and each with their own cubic regions as children). For performance reasons Forces don’t really preview in the Simulation Window, try it out in Play mode. Not sure about the flickering…
Although this thread is a bit old I wanted to give some feedback.
@leweyg_unity It took quite some time for me to recognize that and find this thread. I wonder why the lack of simulating proxy forces isn’t clearly stated. The guide only mentions to press play but doesn’t clearly state that some things just are not available in simulation/device view.
It would be helpful to have this mentioned somewhere more explicit as the forces feature is quite nice and I like the idea and what I imagine can be done with them. Could the docs be updated to include this info in the troubleshooting section (or something else)?
It also would be cool to have it as a hint on objects in the editor while not in play mode but I understand that this might be a bit much to ask ^^
Just took me quite some time to figure out that forces aren’t broken and MARS not just sucks but I’ve been doing it wrong in relying on simulation and device view too much.