ExtendRealityLtd / Tilia.Interactions.SnapZone.Unity

A spatial zone in which an interactable object can be snapped into the designated area for the Unity software
MIT License
5 stars 1 forks source link

Object moves by it own, when Snapzone is attached to an interactable object #234

Open niconicodrake opened 1 year ago

niconicodrake commented 1 year ago

Environment

Tested on Unity 2021.3.19f1

Steps to reproduce

  1. Add a snap zone on an interactable cube.
  2. On this interactable cube is the snap zone attached and not overlapping with the Object
  3. when I move the cube, I also move an attached snap zone.
  4. When I stop grabbing the cube, the object is forced on its own somehow and floats away.

Additional Info:

1. Screenshot 2023-03-13 191642

2.

Screenshot 2023-03-13 202535

3.

https://user-images.githubusercontent.com/84817043/224808387-f38f9d1b-4ea8-4e07-9ac5-d0f93148434a.mp4

Expected behavior

When the Snap zone is attached (also with a slightly offset) the object should not be forced to move against the snap zone. I Want to add another interactable object to this interactable object. to make a bigger one. The new object should be stay connected when I grab it.

Current behavior

When I Grab and release an interactable Object where a snapzone is attached (so that the snapzone moves with it) the Object flies away in the direction of the snapzone. It looks like it is forces by its on to reach its own snap zone.

The "ActivationCollisionArea" is not intersecting with the original interactable attached object. Which means, normally it not be forced to move in its own unreachable snapzone. I used and box collider for the Zone (Screenshot 3).

When I hold the Object which haves the Snap zone and grab another Object and move it inside of the zone --> The object behaves normal because the Snap zone is filled. When I detach the object (and not holding the Object with the SZ) It stays as long I grab it again and release it. The object flies aways as described.