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

vehicle/gameobject moving/listing/rotating when made parent of main character (child) game object

$
0
0
Very simple. 1. I created a main character 2. I make it a child of a vehicle game object using: Destroy (player.GetComponent ()); player.transform.SetParent(this.transform,true); player.transform.position = posicion_de_montar.transform.position; 3. As soon as I do that **the vehicle begins strangely moving/listing and turning without any user input**. I trigger the parenting with an "OnTriggerEnter" on the vehicle. I get my player game object with: player = GameObject.FindGameObjectWithTag ("Player"); In case it makes any difference I'll mention that I did scale up the player game object, neither object has a position of 0,0,0, both have rotation 0,0,0, and the buttons in the top left corner are set to pivot and global. I know I'm a super novice at this. Any help would be appreciated. Thanks in advance.

Viewing all articles
Browse latest Browse all 302

Trending Articles



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