Color of debug drawing not working


#1

I’m trying to set the color of the debug lines, but this does not lead to anything, the color of the debug lines does not change.

my code:

#if arm_debug
DebugDraw.notifyOnRender(function(draw:DebugDraw) {
	var v1 = iron.Scene.active.getChild("player").transform.world.getLoc();
	var v2 = iron.Scene.active.getChild("ai").transform.world.getLoc();
	draw.color = 0x2ed924;
	draw.linev(v1,v2);
});
#end

#2

Could you try constant values if there is any defined ?


#3

static var col:Color = 0x22ff00; // this not affect…

// set color


#4

You can create an issue on Armory Github, perhaps color will work for 0.6 release.


#5

is there an extra paren at the end ? Or is that how this language is written?


#6

The paren at the end is the one that matches with the notifyOnRender function, so that is right.


#7

Created :slight_smile:

I looked at the code DebugDraw class, the color is not used in it:


#8

Hehe nice catch, will fix that. :yum: