I'm now doing a racer on rails like "Outrun". I do have a cool Script from internet that makes the camera and the player follow the Waypoints. The Waypoints are Trigger shapes. I have a level generator that generates road with those Waypoints. However when I hit play and the road is generated, many of the Waypoint triggers have different rotations than in the prefab objects they stem from. Like this :
They seem to differ in size too. I have a suspicion that it is connected to some kind of parent-child scaling problem, but I can't really find it. I do need to add waypoints of newly generated chunk to the waypoint list for camera movement. So it is very important to be able to easily find all waypoints of the chunk under one parent for example.
Have anyone dealt with this problem ?
The level generator has a list of scriptable objects that contain all possible chunks variants that start and end in a proper direction:
They are spawned as they are there is no rotation at this point. The only rotation and scaling that occurs is in the chunk asset itself. I scaled the base of the chunk from a cube and made other objects it's children:
The first one is always tilted in some strange direction. The tilt changed once after a rescale in the chunk asset but other than that it remains constant.