unity – Why do my set off zones change rotation randomly on gameStart in editor?

unity – Why do my set off zones change rotation randomly on gameStart in editor?

[ad_1]

I am now doing a racer on rails like “Outrun”. I do have a cool Script from web that makes the digicam and the participant observe the Waypoints. The Waypoints are Set off shapes. I’ve a stage generator that generates street with these Waypoints. Nevertheless once I hit play and the street is generated, most of the Waypoint triggers have totally different rotations than within the prefab objects they stem from.
Like this :
enter image description here

enter image description here

They appear to vary in dimension too. I’ve a suspicion that it’s related to some form of parent-child scaling drawback, however I can not actually discover it. I do want so as to add waypoints of newly generated chunk to the waypoint record for digicam motion. So it is vitally essential to have the ability to simply discover all waypoints of the chunk below one dad or mum for instance.

Have anybody handled this drawback ?

EDIT. 25.11.23
I’ve a piece hierarchy that include all particular person chunks that may be spawned:
Chunks

The extent generator has an inventory of scriptable objects that include all potential chunks variants that begin and finish in a correct route:

enter image description here

They’re spawned as they’re there is no such thing as a rotation at this level.
The one rotation and scaling that happens is within the chunk asset itself. I scaled the bottom of the chunk from a dice and made different objects it is youngsters:
enter image description here

Which suggests all the kids objects have this fraction quantity scaling, like with the street :
enter image description here

Which additionally has some rotation, however at all times spawns accurately.
However some checkpoints usually are not spawning accurately in any respect. As proven above.
That is their construction:
Parent Obj
CheckPoint

The primary one is at all times tilted in some unusual route. The lean modified as soon as after a rescale within the chunk asset however apart from that it stays fixed.

[ad_2]

Comments

No comments yet. Why don’t you start the discussion?

Leave a Reply