ah of course my mistake, thank you however it seems that the code has not optimized anything which I want to think that GetClosestObjectOfType already does this process. Thank you anyway.