Use GameObject's global position instead of local position

Hello everyone, I am new in unity and I am trying to create a level myself, but I have a problem. As you see on the first picture the position of cylinder is local.
. If anyone knows how to throw an arrow in y direction in local scope. Here is code:
var clonedArrow = Instantiate(arrow,bow.transform.position, bow.transform.rotation); clonedArrow.rigidbody.velocity = bow.transform.TransformDirection(Vector3(0,20,0));

arrow is a public variable of type GameObject from prefab(which has rigidbody already).
Bow is my cylinder.
Thank you beforehand

You need to spend some time investigating the Transform class. Everything you need to access both local and global coordinates is in there, and it’s named very obviously.

For your TransformDirection stuff, take a look at things like up, right, and forward.

First off, this

bow.transform.TransformDirection(Vector3(0,20,0));

(same thing as)

bow.transform.up * 20;

this takes the local direction and converts it to world coordinates… in other words, the direction in question is in fact already based off of the local direction…

(y being the green axis)

so this already IS LOCAL!

(just tested your code to be SURE, it already does exactly what you say you want)

Thank you very much, I did what I want.