Camera Pan Not Working

Can someone please help me check my codes if I missed something? My camera pan is not working :((

Hi @Kaycee_Garcia,

Try providing more info regarding your issue, otherwise it’s difficult for people to be of help.

For example try sharing:

  • What’s exactly wrong with your project? What’s the outcome right now versus the expected one?
  • Sharing your code in question is always good.
  • Even better, sharing a project that’s simple to reproduce your issue works wonders.
1 Like

Hello, thank you for your reply!

Here is my game link: PlayCanvas | HTML5 Game Engine

My expected result is for my camera to pan every time my character jumps to the next object. However, my camera won’t pan :frowning:

1 Like

My dead trigger codes aren’t working as well, it’s the part of my code where the game resets when the character come into collision with the dead zone.

Hi @Kaycee_Garcia! Triggers don’t work when a rigidbody component is added to the entity, which is the case in your project. As a result, your other functions will no longer work as expected. You should modify the script and use onCollisionStart instead of onTriggerEnter or use a different setup.

https://developer.playcanvas.com/en/tutorials/collision-and-triggers/

1 Like

Note that the statement in the image below is also incorrect. this.entity is the trigger itself, so you have to use entity instead, which is the duck.

image