Vector Script

Hello Everyone,

I am trying to draw arrows shown in the above figure. I am using script

var arrowSize : float = 1;
var target : GameObject;
function OnSceneGUI () {
Handles.color = Color.red;
Handles.ArrowCap(0,
target.transform.position + Vector3(5,0,0),
target.transform.rotation,
arrowSize);
Handles.color = Color.green;
Handles.ArrowCap(0,
target.transform.position + Vector3(0,5,0),
target.transform.rotation,
arrowSize);
Handles.color = Color.blue;
Handles.ArrowCap(0,
target.transform.position + Vector3(0,0,5),
target.transform.rotation,
arrowSize);
}

but nothing happening on the screen . AM i doing something wrong ?

These arrow should change in length followed by sets of equations . Please help me . Some one told me before to use primitives , i couldn’t make out . Please SOS !1101472--41387--$carbodyarrow.png1101472--41388--$carbodyarrow.png

Where is this OnSceneGUI() located in? EditorWindow?
Did you try to reference the SceneView? On your function declaration try this

function OnSceneGUI (view : SceneView) {

It is same as before after adding above line .
I am also trying to add this script in my project
/ Draw one Arrow on each axis of any GameObject
// that has the “DummyArrowCapScript.js” script attached.

@CustomEditor (DummyArrowCapScript)
class ArrowCap extends Editor {

var arrowSize : float = 1;

function OnSceneGUI () {
Handles.color = Color.red;
Handles.ArrowCap(0,
target.transform.position + Vector3(5,0,0),
target.transform.rotation,
arrowSize);
Handles.color = Color.green;
Handles.ArrowCap(0,
target.transform.position + Vector3(0,5,0),
target.transform.rotation,
arrowSize);
Handles.color = Color.blue;
Handles.ArrowCap(0,
target.transform.position + Vector3(0,0,5),
target.transform.rotation,
arrowSize);
}
}
And the script attached to this Handle:

//DummyArrowCapScript.js

Debug.Log(“I have ArrowCap Handles attached to this transform!”);

But it says “target” is unknown . I don’t know what is wrong i am doing . Please help me if you also have any other idea than this. All i need those arrows in my game . How can i get those arrows in my game ?. If you can post any script it will be appreciated.