Hello everyone, sorry to bother you, I want to ask how to make Curved turning vehicle movement for NPCs in 3D games, can I use the pathfinding extension?or is there another way that is easier and more efficient?
What is the expected result
smooth curved turning movement of the vehicle
What is the actual result
I have actually tried using the pathfinding extension, but I didn’t find the best solution and what happened was that the vehicle’s movement turned unevenly and steeply.
First, I’ll suggest searching the example games for “curved movement” example. It shows an example of making objects move along a defined curve.
I have second suggestion too. I have seen racing game examples that use invisible objects on the road to set the enemy car movement behavior. You can add an event that checks collision with this object, and if in collision change the cars angle. That will make it rotate around until it reaches a target angle (like down, right, etc depending on the section of the track)
You can then set up a whole track of invisible objects that guide the cars around the track. Set it up just right, and it actually works surprisingly well so long as there is a barrier to prevent the cars from going off the track.