hi friends
how can we find out the moving object’s X Y Z to code and add some number and assign it back to other object so we move both object together
please help me gays
hi friends
how can we find out the moving object’s X Y Z to code and add some number and assign it back to other object so we move both object together
please help me gays
LOL
In all seriousness though, just use
var myXCoord = transform.position.x;
// or to set it to x=3.0 for example...
transform.position.x = 3.0;
…if you’re attaching the script to the same GameObject that you want to control.
[/quote]
Look up transform.position in the Docs
Thank you very much for providing me these suggestions
i asked like that question because i am new to this system
but your help will make it easy for me gays.
thanks again
![]()
var Object : GameObject;
var ObjectVector : Vector3;
var ObjectVector = Object.transform.position;
Hope this helps