While developing my AR app, I suddenly started experiencing my custom models warping and glitching on rotation in AR. I thought at first that it was an issue with my scene, but then when I went back to previous stable scenes in Unity - the same issue occurred on scenes that I am sure were working correctly. I then created a totally new project and downloaded the unchanged sandbox example and experience this same issue, where the model warps (scales in Y-axis) on pinch rotation in AR. I am working in needle 4.9.1 and unity 6.2 (6000.2.2f1)
Hi Arno, thanks for reaching out. Since youâre seeing this issue even with our unchanged sandbox sample and previously stable scenes, it looks like something in the AR pinch rotation handling might be causing unintended nonâuniform scaling (specifically along the Yâaxis). This can happen if the gesture handling mistakenly mixes rotation with scale changes or if the imported models have a non-uniform pivot/scale setup thatâs being amplified.
Here are a few steps to diagnose and work around the issue:
âą First, confirm the imported models have uniform scale and wellâdefined pivots. Nonâuniform scales can lead to unexpected warping when transforms are applied.
âą Next, check your pinch rotation handling (typically provided by Needleâs XR or interaction components). Itâs possible that in version 4.9.1 the gesture processor is inadvertently applying a scale factor along the Yâaxis when you perform a pinch. You can add temporary debug logs to monitor the objectâs scale during the gesture to see if it deviates.
âą As a quick workaround, you might consider normalizing the scale after the pinch. For instance, in a custom component you could enforce a uniform scale like so:
import { Behaviour } from "@needle-tools/engine";
import { Vector3 } from "three";
export class UniformScaleFix extends Behaviour {
update() {
// Enforce a uniform scale if it deviates from 1.
const scale = this.gameObject.scale;
const uniform = Math.cbrt(scale.x * scale.y * scale.z);
if (Math.abs(scale.x - uniform) > 0.001 || Math.abs(scale.y - uniform) > 0.001 || Math.abs(scale.z - uniform) > 0.001) {
this.gameObject.scale.set(uniform, uniform, uniform);
}
}
}
Apply this component temporarily to check if it compensates for the bug.
âą Lastly, since this behavior appears even in the sandbox sample, consider upgrading to the latest version (if available) as the issue might have been addressed in a subsequent patch. If none of these suggestions help, please use the âReport a bugâ option (in Unityâs Needle Engine menu) and include steps to reproduce the issue. That will help our team investigate further.
For AR setup details, you might also review our XR documentation (docs/xr.html).
Hope this helpsâlet me know if you need any more assistance!
1 replies left - Become PRO for more replies.
thread_8XFYMju2h0VedyS6KajIej0q
Reply to this post directly if you need further help (bottom right button)
Hello Arno, the same is happening in the Sandbox example for you ?
Hi Marcel
Yes, correct - When I create totally new unity project, reinstall needle and download the sandbox sample, export web build, without modifying any settings this still happens. This is why I posted here and submitted a bug report as it might be a bug in the engine.
Found the issue - should be fixed in the next update (later today)
Amazing, thanks for your prompt reply!
You can try it here: https://sandbox-z23hmxbzv4avt-2otlce.needle.run/
I have tested and Y-warping issue is fixed
. Will this apply to my projects, when I update needle to latest build later today?
Yes. Itâs released in 4.9.3
Have tested, fix applies to my projects. Next level support, you are a legend!
![]()
This topic was automatically closed 13 days after the last reply. New replies are no longer allowed.