Hiya,
Guess I am having a rough night tonight. ![]()
I have a GO that I want to use SimpleMove to move from the position it is at to a different position (primarily because that is what I am using for all my other movement). Thing is, I am having a problem in figuring out how to determine when I got to the end position. Here is a rough shot at the code:
if (doAutoMove){
gameObject.GetComponent(CharacterController).SimpleMove( transform.TransformDirection(Vector3.forward) * ( 40.0 * 1.0 ) );
if (gameObject.transform.position == movePos2){
doAutoMove = false;
caller2.autoMoveComplete();
}
}
I looked into getting the distance but that didnât seem like it was going to work and thought about Lerp but it wasnât obvious to me on how to work that in either.
Any one have some ideas?
Thanks!
â Clint