# Weird "shadows" on follow camera

**URL:** <https://forum.babylonjs.com/t/weird-shadows-on-follow-camera/38389>\
**Category:** Questions\
**Created:** [February 20, 2023, 6:07pm UTC](https://forum.babylonjs.com/t/weird-shadows-on-follow-camera/38389 "2023-02-20T18:07:23Z")\
**Posts on this page:** 16\
**Page:** 1

<div class="post-metadata">

**Author:** ![Alecell](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/alecell/32/18099_2.png) [@Alecell](https://forum.babylonjs.com/u/Alecell)\
**Post date:** [February 20, 2023, 6:07pm UTC](https://forum.babylonjs.com/t/weird-shadows-on-follow-camera/38389/1 "2023-02-20T18:07:23Z")

</div>

Im using follow camera but I found that after move around for a while it starts to display some weird “shadows” of the meshes on the scene, [you can test it here](https://playground.babylonjs.com/#U8JWWU) and here’s the bug result:

**Normal**

 ![image](https://us1.discourse-cdn.com/flex024/uploads/babylonjs/original/3X/7/d/7db2039a0bf6f7c0a8f63075d38aec79d23720e4.png)

**With the “shadows”**

 ![image](https://us1.discourse-cdn.com/flex024/uploads/babylonjs/original/3X/7/e/7e556038e884a1704b5f1f28a6430e68298219c3.jpeg)  
\*_I had to take the picture with my phone, I explain it below_

We can see that on the edges of the ground there are some “shadows” on the ground, I realized that it happens when I move left (A) and right (B) really fast.

When I was trying to screenshot it I also figured out that this isnt a “shadow” is is actually that the mesh angle for the camera is changing so fast that we have this “shadow” effect here, but how can I evoid that issue?

Am I doing something wrong?

---

<div class="post-metadata">

**Author:** ![sebavan](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/sebavan/32/57_2.png) [@sebavan](https://forum.babylonjs.com/u/sebavan)\
**Post date:** [February 21, 2023, 7:03pm UTC](https://forum.babylonjs.com/t/weird-shadows-on-follow-camera/38389/2 "2023-02-21T19:03:27Z")

</div>

cc @Cedric and @RaananW for the physics part as I wonder if it could be related ?

---

<div class="post-metadata">

**Author:** ![RaananW](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/raananw/32/28955_2.png) [@RaananW](https://forum.babylonjs.com/u/RaananW)\
**Post date:** [February 21, 2023, 7:49pm UTC](https://forum.babylonjs.com/t/weird-shadows-on-follow-camera/38389/3 "2023-02-21T19:49:19Z")

</div>

Are you referring to the camera’s constant back-and-forth movement?

[https://us1.discourse-cdn.com/flex024/uploads/babylonjs/original/3X/d/d/dd0152893342e6c26af3495265152e17dd6e67fb.mp4](https://us1.discourse-cdn.com/flex024/uploads/babylonjs/original/3X/d/d/dd0152893342e6c26af3495265152e17dd6e67fb.mp4)

This feels like a misconfigured follow camera. I removed all of the parameters except for the radius and it seems to be more stable. Is that the issue here? or am I missing something?

---

<div class="post-metadata">

**Author:** ![Alecell](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/alecell/32/18099_2.png) [@Alecell](https://forum.babylonjs.com/u/Alecell)\
**Post date:** [February 21, 2023, 7:56pm UTC](https://forum.babylonjs.com/t/weird-shadows-on-follow-camera/38389/4 "2023-02-21T19:56:58Z")

</div>

Well… also 😅

I was trying to ask one question per time but yeah I got this error too, not sure what I’m doing wrong with the camera ;-;

Edit: Seems like its something with the applied forces on the mesh, I added a jump on a test and the camera kind flick when I do so

[https://us1.discourse-cdn.com/flex024/uploads/babylonjs/original/3X/a/4/a48bee042880df8b6f4d996a1eeb699a42d37333.mp4](https://us1.discourse-cdn.com/flex024/uploads/babylonjs/original/3X/a/4/a48bee042880df8b6f4d996a1eeb699a42d37333.mp4)

---

<div class="post-metadata">

**Author:** ![Alecell](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/alecell/32/18099_2.png) [@Alecell](https://forum.babylonjs.com/u/Alecell)\
**Post date:** [February 26, 2023, 8:27pm UTC](https://forum.babylonjs.com/t/weird-shadows-on-follow-camera/38389/5 "2023-02-26T20:27:34Z")

</div>

Hey @RaananW any idea of what could be causing that error? Im still facing the issue and I’m not sure what could be causing that 😢

I mean, the zoom thing I showed on my previous answer, the other issue I solved changing some of the configuraions

---

<div class="post-metadata">

**Author:** ![RaananW](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/raananw/32/28955_2.png) [@RaananW](https://forum.babylonjs.com/u/RaananW)\
**Post date:** [February 27, 2023, 2:01pm UTC](https://forum.babylonjs.com/t/weird-shadows-on-follow-camera/38389/6 "2023-02-27T14:01:33Z")

</div>

Sorry, totally missed that. can you share the playground you are testing with?

---

<div class="post-metadata">

**Author:** ![Alecell](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/alecell/32/18099_2.png) [@Alecell](https://forum.babylonjs.com/u/Alecell)\
**Post date:** [March 8, 2023, 6:13pm UTC](https://forum.babylonjs.com/t/weird-shadows-on-follow-camera/38389/7 "2023-03-08T18:13:30Z")

</div>

Hey @RaananW it took me a while, but I moved it to a playground!

To jump you just need to hit “w”

> **[Babylon.js Playground](https://playground.babylonjs.com/#0V7KM3%236)**
>
> Babylon.js playground is a live editor for Babylon.js WebGL 3D scenes

---

<div class="post-metadata">

**Author:** ![RaananW](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/raananw/32/28955_2.png) [@RaananW](https://forum.babylonjs.com/u/RaananW)\
**Post date:** [March 9, 2023, 12:54pm UTC](https://forum.babylonjs.com/t/weird-shadows-on-follow-camera/38389/8 "2023-03-09T12:54:29Z")

</div>

hey! great!

I can’t seem to get it to work, for some reason. “w” does nothing?

---

<div class="post-metadata">

**Author:** ![Alecell](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/alecell/32/18099_2.png) [@Alecell](https://forum.babylonjs.com/u/Alecell)\
**Post date:** [March 9, 2023, 2:58pm UTC](https://forum.babylonjs.com/t/weird-shadows-on-follow-camera/38389/9 "2023-03-09T14:58:04Z")

</div>

Hey I was testing here and seems like the player took a huge while to load, but after it loads the jump works, was that the issue you faced?

Or the player actually loaded but nothing happened?

You should be able to move it with W, A and D 🤔

---

<div class="post-metadata">

**Author:** ![RaananW](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/raananw/32/28955_2.png) [@RaananW](https://forum.babylonjs.com/u/RaananW)\
**Post date:** [March 9, 2023, 3:26pm UTC](https://forum.babylonjs.com/t/weird-shadows-on-follow-camera/38389/10 "2023-03-09T15:26:27Z")

</div>

Sorry - was a local issue. I can see what you are referring to. Seems to be the combination of physics and the follow camera, but let me try debugging this.

---

<div class="post-metadata">

**Author:** ![bghgary](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/bghgary/32/48532_2.png) [@bghgary](https://forum.babylonjs.com/u/bghgary)\
**Post date:** [March 10, 2023, 1:31am UTC](https://forum.babylonjs.com/t/weird-shadows-on-follow-camera/38389/11 "2023-03-10T01:31:46Z")

</div>

Assigned @RaananW on March 10, 2023, 1:31am UTC



---

<div class="post-metadata">

**Author:** ![RaananW](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/raananw/32/28955_2.png) [@RaananW](https://forum.babylonjs.com/u/RaananW)\
**Post date:** [March 10, 2023, 10:37am UTC](https://forum.babylonjs.com/t/weird-shadows-on-follow-camera/38389/12 "2023-03-10T10:37:56Z")

</div>

Unassigned @RaananW on March 10, 2023, 10:37am UTC



---

<div class="post-metadata">

**Author:** ![RaananW](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/raananw/32/28955_2.png) [@RaananW](https://forum.babylonjs.com/u/RaananW)\
**Post date:** [March 10, 2023, 10:38am UTC](https://forum.babylonjs.com/t/weird-shadows-on-follow-camera/38389/13 "2023-03-10T10:38:02Z")

</div>

Assigned @Cedric on March 10, 2023, 10:38am UTC



---

<div class="post-metadata">

**Author:** ![RaananW](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/raananw/32/28955_2.png) [@RaananW](https://forum.babylonjs.com/u/RaananW)\
**Post date:** [March 10, 2023, 10:38am UTC](https://forum.babylonjs.com/t/weird-shadows-on-follow-camera/38389/14 "2023-03-10T10:38:49Z")

</div>

I found a quick solution, but I believe there is a better one. @Cedric will take some time today to check it, and we will decide on a solution later today

---

<div class="post-metadata">

**Author:** ![RaananW](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/raananw/32/28955_2.png) [@RaananW](https://forum.babylonjs.com/u/RaananW)\
**Post date:** [March 10, 2023, 5:32pm UTC](https://forum.babylonjs.com/t/weird-shadows-on-follow-camera/38389/15 "2023-03-10T17:32:00Z")

</div>

Thanks again for reporting this!

I have found a solution that doesn’t hurt performance, and it will be available in the next version:

[Fixing an issue with follow camera and physics by RaananW · Pull Request #13618 · BabylonJS/Babylon.js (github.com)](https://github.com/BabylonJS/Babylon.js/pull/13618)

---

<div class="post-metadata">

**Author:** ![RaananW](https://sea2.discourse-cdn.com/flex024/user_avatar/forum.babylonjs.com/raananw/32/28955_2.png) [@RaananW](https://forum.babylonjs.com/u/RaananW)\
**Post date:** [March 10, 2023, 5:42pm UTC](https://forum.babylonjs.com/t/weird-shadows-on-follow-camera/38389/16 "2023-03-10T17:42:42Z")

</div>

Unassigned @Cedric on March 10, 2023, 5:42pm UTC


