That seems like an issue with your player entity missing the anim component. Did you setup your player entity to have an anim state graph like the example project does?
Hi @Lorenzmotors! The problem is probably caused because there are multiple entities in your project with the name ‘Camera’. Because of this, line 7 of the script below uses the wrong camera.
Is the solution to duplicate PlayerMovement.js, attach one to the player and one to the dronecar, name it something else, and then change the Camera entity names?
That is a possible solution. But in this case I think it’s easier to replace line 7 with the line below, I’m not sure why it is not in the the tutorial project already like that.
The animation works now, and no errors, but the camera doesn’t follow the player like in the tutorial. I want to implement a dronecase into the simulator.
And, I want to implement a script into the dronecase that does ai face tracking, follow player, take picture/video, take off and land all from a smartwatch-looking-ui, so I need the camera to be behind the player.
I see in your video that your camera is following your player.
I don’t understand this, so hopefully someone else can help you with it.
If you mean the camera of the third person controller you can just set the right position and rotation of the camera in the editor. You can also select the camera to see the view of it. Don’t forget to switch back, otherwise you change the view when you move around in the editor.
Thank you, I saw that too and deleted one of the cameraMovement's. The player seems to be responding to mouse movements now, but what I meant to say originally is that the camera is 1. stationary, and 2. very high up above the player; it seems to be stuck in place.
The very-high-up problem seems to stem from the Camera Axis positioning.
When I bring the Camera Axis positioning closer to the player: it makes it seem like the mouse movement isn’t working, because the camera isn’t “following” or “trailing” the player.
The camera is already positioned that way in the editor. Make sure that the camera (and all other children) are positioned the same way as in the example project.
So, when I first started this: I went through each of the entities from the example, so everything should match. Is this what you mean by camera positioning?
I know the gameplay view should be right behind the player; following them, but it looks like this:
When I was looking at your project the camera and other children where on the wrong position far above the player. I see you have fixed that now, but the camera in launch in still on the wrong position and is not rotating with the player. You have a couple of camera’s in your project. I can’t find the ‘ThirdPerson’ camera in the hierarchy. Are you sure this one is disabled?
You’re right, it was one of the cameras interfering. I have since renamed them, and got rid of ThirdPerson.
I programmed the dronecase to face-track and follow the player; I made the dronecase a child to the player, but I’m wondering if there’s a more sophisticated way of doing it?
I’ll start a new topic. Thanks for your help with this!