Search Unity

How do I get mesh renderer to transform with the mesh collider?

Discussion in 'Animation' started by ajmuddogs20, Dec 15, 2019.

  1. ajmuddogs20

    ajmuddogs20

    Joined:
    Nov 6, 2019
    Posts:
    1
    Heya folks, my friends and I are developing a farming game in Unity 2018.4 I am currently working on creating a growing animation. The basis of the idea is that when the crop is clicked, it will transform under the map and slowly move back to its original position. Currently, the script I have created is intended to transform the crop to a location off the map for now. The Apple Orchard is a collection of low-poly apple tree prefabs. The orchard is the child of an orchard hitbox I created. With the code I have now, when you click the hitbox the hitbox and the Mesh Colliders of the Apple Trees move. The problem is, I can't seem to figure out how to get the Mesh Renderers to move along with it. I've attached a screenshot of what happens when you click the orchard hitbox. Screen Shot 2019-12-15 at 4.17.39 PM.png If anyone has any tips, please let me know. Thanks!