Quantcast
Channel: Questions in topic: "error"
Viewing all articles
Browse latest Browse all 7934

'position' is not a member of 'Object' error

$
0
0
Hi. I have a problem with this Assets/Scene/Script/PathScript.js(20,22): BCE0019: 'position' is not a member of 'Object'. what should I do, sorry I'm only a newbie here... var path : Array; var rayColor : Color = Color.white; function OnDrawGizmos(){ Gizmos.color = rayColor; var path_objs : Array = transform.GetComponentsInChildren(Transform); path = new Array(); for (var path_obj : Transform in path_objs){ if(path_obj != transform) path [path.length] = path_obj; } for (var i : int = 0; i < path.length; i++){ var pos : Vector3 = path[i].position; if(i>0){ var prev = path[i-1].position; Gizmos.DrawLine(prev,pos); Gizmos.DrawWireSphere(pos,1.0); } } }

Viewing all articles
Browse latest Browse all 7934

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>