I have an object which should be always on the roof of my wheeled vehicle.
At the moment I spawn it where the car is and move it with the car every tick. This does not work because of the tend and tilt of the car.
Because currently it is fixed to the “center” of the point it does not care for the tilt.
Is it possible to lock it physically to the car so it moves with it and I do not have to do anything for it?
Im pretty new to Unreal C++. My car based on WheeledVehicle.
So when the car spawns it get the function SpawnRoofObjects() which currently looks like this:
Spawn object with GetWorld()->SpawnActorDeferred …
Set a controller to the pawn just spawned.
Then every tick get the cars currentLocation and move the object.
How to lock it on the roof (or anywhere else)
Thanks a lot for helping!