Add to this Thread

visual line folllowing
6 years
HI steven,
i don't understand the function in VBScript
x = GetVariable("COG_X")
y = GetVariable("COG_Y")

cx = GetVariable("IMAGE_WIDTH") / 2    why need to divide by 2?
cy = GetVariable("IMAGE_HEIGHT") / 2   why need to divide by 2?
xoff = GetVariable("IMAGE_WIDTH") / 8  why need to divide by 8?
yoff = GetVariable("IMAGE_HEIGHT") / 16  why need to divide by 16?

if x < cx - xoff then
  if y < cy - yoff then
    move = "pivot left"
    move = "left"
  end if
elseif x > cx + xoff then
  if y < cy - yoff then
    move = "pivot right"
    move = "right"
  end if
  if y < cy - yoff then
    move = "backup"
    move = "straight"
  end if
end if

SetVariable "move", move

Pick Avatar
* Question/Comment - Only <b>, <i>, <u> tags are allowed. All others will be escaped.
Use the tags [image1], [image2], etc. to place the images within your question/comment.
Upload Images (.jpg, .png, .gif) < 300K, robofiles (.robo) or Zip files (.zip) < 300K.

If you have any questions/issues about RoboRealm or image processing this is your chance to ask a question. Your question and any responses will be posted to the forum section of the website for others to read and learn from.

Note that any submission will be considered property of RoboRealm. If you do not wish your images to be displayed as part of the RoboRealm site please do not submit those images. Any submission may be removed from the website at the discretion of RoboRealm personnel.