Quantcast
Channel: Questions in topic: "parenting"
Viewing all articles
Browse latest Browse all 302

WorldPositionStays true not working

$
0
0
character.transform.SetParent(transform, true); This piece of code runs in a moving platform. On collision it should set the character's parent and keep the character's original position, scale and rotation. However when the moving platform is rotated for example 90 degrees, the character is rotated 90 degrees on collision and placed at the side of the platform. When I use 180 degrees, the character is upside-down and placed under the moving platform on collision. When I comment away the code, the character stands straight up. Isn't the whole idea of worldPositionStays to not let this happen? Why is it happening nonetheless?

Viewing all articles
Browse latest Browse all 302

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>