Open kyawai opened 1 year ago
@kyawai do you have a video of the issue occurring?
One thing that could be causing this issue is because you've nested a SnapZone within an Interactable, the snap zone collider will be potentially constantly colliding with the interactable collider and when you try snap something it, it could tank your performance and cause jittering.
You could try using a Collision Ignorer (or the layers collision matrix in Unity) to get the Interactable colliders to ignore collisions with the nested SnapZone collider.
Then you won't see any performance reduction.
Environment
Tested on Unity 2021.3.16f1
Steps to reproduce
Expected behaviour
In play mode in VR, I'm expecting for the 2 cubes to be separate, when I pick them up and snap them together, they stay together, I am then able to walk around with them, drop them and pick them up (by grabbing the cube with the snap zone object), they will still be snapped and smoothly moving around with my movement.
Current behaviour
In play mode in VR, currently if the cubes are picked up and snapped the snap zone works as expected. However, when dropped whilst still snapped and picked up again, walking around with them causes jittering to the object that has been snapped. It also jitters when the cube starts off as snapped.
Extra notes:
This is an issue that happens sometimes, when I first encountered this issue, I recreated the snap zone and it worked as expected for the first day of working on it, the next day it has gone back to jittering.