erik3227 Posted June 12, 2020 Share Posted June 12, 2020 How to make growing 3d plant? Any example? Spoiler Suport me. https://www.donationalerts.com/r/erik37 Link to comment Share on other sites More sharing options...
erik3227 Posted June 12, 2020 Author Share Posted June 12, 2020 using System.Collections; using System.Collections.Generic; using UnityEditor.Profiling.Memory.Experimental; using UnityEngine; public class GrowingPlant : MonoBehaviour { public float growspeed = 0.01f; private void Start() { transform.parent.GetComponent<BoxCollider>().enabled = false; } void Update() { if (transform.localScale.x < 1.0) { transform.localScale += new Vector3(0.1f,0.1f,0.1f) * Time.deltaTime * growspeed; } if (transform.localScale.x >= 0.9f) { transform.parent.GetComponent<BoxCollider>().enabled = true; //Ready for harvesting } } } Link to comment Share on other sites More sharing options...
erik3227 Posted June 12, 2020 Author Share Posted June 12, 2020 Ready but! with modifed assembly-csharp.dll Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.