# Marker is causing issues when is near to camera

**URL:** <https://discourse.threejs.org/t/marker-is-causing-issues-when-is-near-to-camera/21223>\
**Category:** Questions\
**Tags:** transform, gltf-loader, camera, geometry, textures, materials\
**Created:** [December 3, 2020, 7:51pm UTC](https://discourse.threejs.org/t/marker-is-causing-issues-when-is-near-to-camera/21223 "2020-12-03T19:51:34Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![vader.memo](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/vader.memo/32/14208_2.png) [@vader.memo](https://discourse.threejs.org/u/vader.memo)\
**Post date:** [December 3, 2020, 7:51pm UTC](https://discourse.threejs.org/t/marker-is-causing-issues-when-is-near-to-camera/21223/1 "2020-12-03T19:51:34Z")

</div>

Hi, friends

I have a problem with the marker, when I approach the camera to the marker and I want to see the virtual objects from the side, that is to say from their sides, for some strange reason the objects rotate towards the camera, preventing the visualization of the lateral area. Is there any code option that allows me to eliminate this strange behavior?

Greetings and thanks in advance

---

<div class="post-metadata">

**Author:** ![Sarge](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/sarge/32/23494_2.png) [@Sarge](https://discourse.threejs.org/u/Sarge)\
**Post date:** [December 3, 2020, 8:04pm UTC](https://discourse.threejs.org/t/marker-is-causing-issues-when-is-near-to-camera/21223/2 "2020-12-03T20:04:04Z")

</div>

Hi,

You can reduce the near clipping value of your camera to `0.001` such as this:

`const camera = new THREE.PerspectiveCamera(70, window.innerWidth / window.innerHeight, 0.001, 100)`

---

<div class="post-metadata">

**Author:** ![vader.memo](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/vader.memo/32/14208_2.png) [@vader.memo](https://discourse.threejs.org/u/vader.memo)\
**Post date:** [December 3, 2020, 8:31pm UTC](https://discourse.threejs.org/t/marker-is-causing-issues-when-is-near-to-camera/21223/3 "2020-12-03T20:31:25Z")

</div>

> [@Sarge](#):
>
> THREE.PerspectiveCamera

Doesn’t works.

This snippet was added to the actual source, sadly with not change ☹

```
               <a-entity camera="active: true, near:0.001, far:100"></a-entity>

```

I play with a range of values beteen 0.001 to 0.1, same issue.

---

<div class="post-metadata">

**Author:** ![Sarge](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/sarge/32/23494_2.png) [@Sarge](https://discourse.threejs.org/u/Sarge)\
**Post date:** [December 3, 2020, 8:39pm UTC](https://discourse.threejs.org/t/marker-is-causing-issues-when-is-near-to-camera/21223/4 "2020-12-03T20:39:48Z")

</div>

So you are using a-frame, maybe issue is due to losing the track of the floor or the marker when the mobile device gets too close. If that is the case you can try to upscale your object so it fits the screen from some distance. Can you post a video or gif of how the issue looks like?

---

<div class="post-metadata">

**Author:** ![vader.memo](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/vader.memo/32/14208_2.png) [@vader.memo](https://discourse.threejs.org/u/vader.memo)\
**Post date:** [December 3, 2020, 8:53pm UTC](https://discourse.threejs.org/t/marker-is-causing-issues-when-is-near-to-camera/21223/5 "2020-12-03T20:53:28Z")

</div>

The change was done on object, now is more bigger, but even doesn’t works  
This is the video =\> [https://we.tl/t-fsByzrKNhc](https://we.tl/t-fsByzrKNhc) (I can’t upload to this server because is too big) from 12 seconds is the issue, the object rotate to the camera.

Same video here =\> [https://wetransfer.com/downloads/fbffba0052b47d49fd7a2ccfe76f9f7b20201203204957/ab7ad5e627a13c43eaa729ceeb4fa67c20201203205017/383273](https://wetransfer.com/downloads/fbffba0052b47d49fd7a2ccfe76f9f7b20201203204957/ab7ad5e627a13c43eaa729ceeb4fa67c20201203205017/383273)

---

<div class="post-metadata">

**Author:** ![Sarge](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/sarge/32/23494_2.png) [@Sarge](https://discourse.threejs.org/u/Sarge)\
**Post date:** [December 3, 2020, 11:53pm UTC](https://discourse.threejs.org/t/marker-is-causing-issues-when-is-near-to-camera/21223/6 "2020-12-03T23:53:34Z")

</div>

I tested AR.js marker examples, I get jittery movement, loss of track but random rotation of the object was not one of the side effects.

---

<div class="post-metadata">

**Author:** ![vader.memo](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/vader.memo/32/14208_2.png) [@vader.memo](https://discourse.threejs.org/u/vader.memo)\
**Post date:** [December 4, 2020, 8:33pm UTC](https://discourse.threejs.org/t/marker-is-causing-issues-when-is-near-to-camera/21223/7 "2020-12-04T20:33:13Z")

</div>

It is extremely strange, but it is reality, see how the object rotates in the video. It doesn’t always happen. Is it a question of the geometry of the object or do you think it is an issue of the three or the marker?

In the image, the label had to be facing forward, not towards the camera, additionally, the object completely broken.

The strange thing is that it happens to me more times on a QR positioned perpendicular to the ground, while if it is lying down, it does not happen always.

[imagen|357x500](https://discourse.threejs.org/uploads/short-url/uVBHwA6HXOligugObVwMA3BuOR9.jpeg)

thanks for your time, bro.

---

<div class="post-metadata">

**Author:** ![vader.memo](https://yyz1.discourse-cdn.com/flex035/user_avatar/discourse.threejs.org/vader.memo/32/14208_2.png) [@vader.memo](https://discourse.threejs.org/u/vader.memo)\
**Post date:** [December 8, 2020, 7:29pm UTC](https://discourse.threejs.org/t/marker-is-causing-issues-when-is-near-to-camera/21223/8 "2020-12-08T19:29:32Z")

</div>

something is wrong whn a put on tag arjs this conf

arjs =‘sourceType: webcam; sourceWidth: 600; sourceHeight: 400;  
displayWidth: 600; displayHeight: 400; canvasWidth: 600;  
canvasHeight: 400; debugUIEnabled: false;’

when put only  
arjs=‘debugUIEnabled: false’  
all works perfectly.
