I thought I copied the following simple script correctly, but it doesn’t draw a line between the two cubes; I assume I’ve made an obvious mistake, but as a nube to Blender and Python, I don’t see it.
import Rasterizer as r import GameLogic as g own = g.getCurrentController().owner objects = g.getCurrentScene().objects pointA = own.position pointB = objects("OBpointB").position color = (0,0,1) r.drawLine(pointA, pointB, color)
(edit): told you I’m nube, don’t yet know Python conventions, of course it should be:
pointB = objects[“OBpointB”].position
In my defense, the youtube I got the script from was blurry, & I couldn’t tell the difference between parentheses and brackets on my screen; & even error line number didn’t clue me in enough.
drawLineTwoCubes1x.blend (133 KB)