Quantcast
Channel: Questions in topic: "rotating"
Viewing all articles
Browse latest Browse all 173

How can i rotate a 3D platform and fix a little problem?...

$
0
0
If i jump on that platform i use this script to hold the character on that platform, so it move with it: void OnTriggerEnter (Collider other) { if (other.gameObject.tag == "Player") { other.transform.parent = gameObject.transform; } } void OnTriggerExit (Collider other) { if (other.gameObject.tag == "Player") { other.transform.parent = null; } } The problem with that is... i also get the same rotation of that object(platform) and this makes the problem. If i jump on it or from it away. I get a whole different rotation on my character and it makes it unplayable. To rotate the platform i use this script, both scripts are on the rotating platform: float y; public float speedY; void FixedUpdate () { y += Time.deltaTime * speedY; transform.rotation = Quaternion.Euler(0,y,0); }

Viewing all articles
Browse latest Browse all 173

Trending Articles



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