How could we make this AI vehicle dynamic?

I have used the following tutorial to implement an AI vehicle.
https://developer.playcanvas.com/en/tutorials/camera-following-a-path/

Is there a way to make it a dynamic rigid body entity?

Here is the link to the project.
https://playcanvas.com/project/1023533/overview/demo

Hi @yash_mehrotra,

The camera following a path example works by setting the position of the entity directly. That will not work with physics.

For a racing AI a common system is creating curves that follow the track and have the AI vehicles move either by forces or by setting their velocity towards the direction of the curve. That is just a rough outline.

I don’t have an example in mind, but there is plenty of literature online on the subject (from other game engines).

@Leonidas Checkout this implementation once. Just click or tap to move the ai car.
https://playcanvas.com/project/1023533/overview/demo

I took reference from the following tutorial.
https://developer.playcanvas.com/en/tutorials/point-and-click-movement/

1 Like

I do realise that I would have to go through few tutorials to get it right.