I have a vehicle work fine when place directly in the level map,
but when i spawnActor the functions “Set Steering Input” and “Set Throttle Input” don´t work.
I know the physics is ok, because when floor have angle de vehicle starts movement.
I use breakpoints and call functions and values is ok.
Someone have idea whats gone wrong?
Vehicle can´t spawned?
Another function is necessary?
Which the difference of place on the map and use function “SpawnActor”?
We have skirted the problem using translation to an “limbo” area for the game,
however would like to use spawn and destroy.
In my case I was using the master pose pose on the mesh vehicle, there was no need but as it was an inheritance let it pass. This caused the problem of not moving inside the package.
I am having the same issue when using SpawnActor with Class to spawn a Chaos-based vehicle blueprint from the CitySampleVehicle project offered freely from the UE5 marketplace.
The solution for my case is adding a Spawn Default Controller for the vehicle pawned. With this node, the vehicle pawn not can move forward with the throttle greater than 0.
ChatGPT tells me that why to do that
The function Spawn Default Controller does the following:
It automatically creates and assigns a default controller to a pawn if it doesn’t already have one. This is useful for AI-controlled pawns or when you want the engine to handle assigning the controller automatically.
It is typically called after a pawn is spawned into the game world.