- Home /
This question was
closed Sep 15, 2019 at 05:35 PM by
SaidRH2020 for the following reason:
Other
Question by
SaidRH2020 · Jun 27, 2018 at 01:31 PM ·
texturetransformtriggersalignalign two objects
how can i keep the ground align with the red line in the image below
capture.png
(16.7 kB)
Comment
Is the ground part of the same object as the chain? Are you rotating the chain object and wanting the ground to stay level?
Best Answer
Answer by aballif · Jun 27, 2018 at 01:45 PM
Make the ground a separate object but make it lock the position to the end of the chain. This shouldn't change the rotation and the ground should always be level. If you put an empty GameObject where you want the ground you can make the ground stick to the empty GameObject.
public GameObject groundSpot;
void Update () {
this.transform.position = groundSpot.transform.position;
}