Multiple feedback objects in a scene

Hello,

I am working with the Unity (v2022.3.62f2) package (v3.2.0) for the Inverse 3, and I am having trouble creating a scene with more than one object capable of providing haptic feedback. My goal is to have multiple meshes (with MeshColliders) in the same scene, where each mesh can provide resistance and texture feedback in response to the user’s input.

The scene is structured as follows:

  • All the required Haply objects and components (origin, controller, etc.)
  • Two meshes with MeshColliders and a custom “mesh feedback” component (largely based on the SphereForceFeedback script provided in the package tutorial folder)
  • Cameras, lights, and other visual elements

While testing a built version of the software, only one of the mesh objects provides haptic feedback, while the other does not respond at all. It feels as if its feedback system is not working or is not detecting collisions with the controller object. I also tried enabling and disabling the feedback component of the closest object at runtime, but the problem persists: the same mesh always remains “solid”, while the other has no resistance.

Additionally, I sometimes encounter an issue where the XYZ translation of the Inverse 3 does not correctly move the in-game cursor object, while rotation still works as expected.

I was only able to switch which object was “solid” in a single case, in a test scene where I was experimenting with a grab interaction. The grab mechanic works by disabling the grabbed object’s colliders and feedback component when grabbed, parenting it to the cursor’s transform, and then re-enabling everything on release and removing the parent relation to the cursor. In this case, the “hardness” of the grabbed object did seem to turn off correctly, but it remained disabled even after release. It appeared as though the two objects were swapping feedback capability when a grab occurred: disabling feedback on the grabbed object and enabling it on the other one.

I would really appreciate any advice on how to properly set up a scene with multiple haptic objects. If any additional information is needed, I would be more than happy to provide it.

Thanks in advance,
E

Hello,

After a couple of emails with Haply’s staff, we managed to find a solution to my issues.

In my application, all the different haptic objects were calculating and applying a force directly to the Inverse 3 controller using the SetCursorForce() method. I initially assumed that all forces would be summed together and then applied to the i3 controller. However, only the most recent force was actually being applied, which resulted in only one object feeling “solid” at any given time.

The solution was to create a separate class responsible for handling all SetCursorForce() requests. This class accumulates the force vectors coming from the different haptic objects and then applies the resulting summed force to the cursor.

With this approach, collisions and haptic feedback now work correctly on multiple objects. There are still some issues with precise mesh collision detection, but those seem to be unrelated to the haptic system itself.

I also found the cause of that problem: Gizmos. It may have been related to other graphical elements I added to the project, or to my rather “guerrilla-style” debugging, but as soon as I disabled Gizmo rendering, the scene worked perfectly again.

Hope this helps someone else.

1 Like