- Home /
move to a position not being looked at
Ive been trying to move an object to a position, the code below doesnt work correctly though and Ive been at it for some time and cant see just what i'm doing wrong, any suggestions would help;
// get target position Vector3 targetMoveLoc = targetPos.position;
// direction to target Vector3 moveDirection = targetMoveLoc - transform.position;
// move Ccontroller to target position controller.Move(moveDirection.normalized movementSpeed Time.deltaTime);
ideas ?
Comment
Answer by TahirG · Mar 29, 2012 at 06:27 PM
sorry, it seems the code was correct, the character was colliding with its weapons after picking them up, so i resolved it...