How to follow camera to animated model?

Hello. If I add camera as children object to entity it stay at pivot point. But my car-animation is playing and its pivot point not moving. Its baked animation and I just want to make my camera following car.
Help please :raising_hand_man:t2:

Hi @11118 and welcome,

To have your camera follow your animation you should add it as a child to an animation bone.

Check this thread on how to do that:

Leonidas, Thank you. But camera as a child is not moving ( I think because pivot point of the entity is not moving too, animation is a model of a car following a bake path) you can see it in screenshot.

To have an entity follow an animation point, the only way I see is to add it as a child to one of the bones of the animation (or get the bone position per frame and update your camera).

If you are trying to do something different, please explain further, not sure I am following you fully.

Thank you. I just bake position and rotation of the car in blender, should I import animation of a bone? not a model of car? is it right method to make animation in engine?

If you are planning of animating the camera based on the car’s animation, I’d say that is the easier option.

Animate a bone in Blender and then find it in Playcanvas with its name (in code, check the forum for sample code) and attach the camera to that bone.

It will automatically follow the animation path.

OMG thank you. I found sample code and now camera is following to animation path. But its view is not correct. - project and code
I don’t know how to change its location

Hi, what do you mean exactly by “find it in Playcanvas with its name” i’m trying to import an animated bone from cinema 4d via fbx. But frrom there on i don’t no what to de next. i see a line moving. thats all

The internal structure of your animation isn’t exposed in editor.

You will have to write a script that finds that bone, by its name, and parents the camera in place to follow your path:

// sample code running on the entity that holds the model and animation
var internalNode = this.entity.findByName('MyBoneName');