Enemy not following the player

my enemy isnt following the player.

here is my game

Character Y pos is 1.895.
enemy Y pos is 0.


gives a force with Y.
Change to

var lookPos = new pc.Vec3(this.thePlayer.getPosition().x, this.entity.getPosition().y, this.thePlayer.getPosition().z);

might help

Also, dont forget to change the lookat script for the Y reason. Maybe just delete it.

it says Vec3 isnt defined

still not following my player

Sorry, should be

still not working

this.thePlayer = this.app.root.findByName("Patrol");
should be
this.thePlayer = this.app.root.findByName("Character");
I think

the enemy kinda follows the player now but its like rotating and walking on different paths before getting close to the player and its not also totally in front of the player when it follows it

Try set this.entity.rigidbody.linearVelocity directly. But not add a force.

Like this.entity.rigidbody.linearVelocity = this.entity.forward;

its not working , can I give you editor access?

Remove rigidbody and collision on Ch14_nonPBR@Walking (1). For the parent entity already has them.

Yes. Sure