I want to access Vector.down of my array Object but, I am unable to find a way to access it............ Have any clue??


Vector3 vec=_array[0].GetComponent();
if (Physics.Raycast(
_array[0].GetComponent().dow, 3f))
p1_PhysicsHandler += () => state = g1_States.gamestart;
p1_InputHandler += () => state = g1_States.gamestart;

Vector3 is a struct, a pure data type that holds 3 float values. It’s not a Component derived type and can not be attached as a component to a gameobject. So I’m not sure what you’re asking because your code doesn’t make much sense. If you want to get the relative “down” vector of the Transform of the gameobject you have to use the “up” property of the Transform component and invert it to get the down vector since the Transform class doesn’t have a dedicated “down” property. You should do

Transform trans = _array[0].transform;
if (Physics.Raycast(trans.position, -trans.up, 3f))
    // [ ... ]