Hi,
I am using Image targets to place an object, but my object does not stay at the same place when I move my device, it changes position around the image when I move my phone.
I am using a script similar to the following project:
Hi George,
I don’t think it’s something I changed, because when I replace my object by the jelly fish model in my project, everything works fine and the object does not move when I move the device.
I have the following code:
" const showTarget = ({detail}) => {
if (detail.name === ‘video-target’) {
depthkit.position.copy(detail.position)
depthkit.quaternion.copy(detail.rotation)
depthkit.scale.set(detail.scale = 20, detail.scale = 20, detail.scale = 20)
depthkit.video.muted = false
depthkit.visible = true
depthkit.video.play()
}
}"
I noticed that on the line “depthkit.scale.set”, when I update the last parameter as follows:
“depthkit.scale.set(detail.scale = 20, detail.scale = 20, detail.scale = 1)”, there is no issue anymore and the object stops moving when moving the device (but the object looks flat).
Any ideas what may be causing this issue and how to solve it?
Has a solution been found for this yet? My problem is the very same thing and also have the solution when i set the z to 1. Fixes the problem but its very flat.
Hi @Evan, the issue is the same if we reduce the scale. Here is a video of the issue, where the object is moving. Could you please help fix this issue? Thank you