Can't change body's color of jit.phys.body with message or argument

Roald Baudoux's icon

Sending a color message results in a 'doesn't understand "color" ' error message and trying to set it within the object using "@color" results in a ' "color" is not a valid attribute argument' error message.

Happens in Max 6.0.8 (but I see nothing about this in the Max 6.1.0 release notes so it's still there probably).

Roald Baudoux's icon

Actually I figured out this would change the object's color not the body's color. which is what I want actually. How could I do it ?

matmat's icon

Salut,
you can assign color directly on the gl object not "phys" object...
mathieu

Roald Baudoux's icon

Which gl objet ?

matmat's icon

"jit.gl.gridshape @color 0 1 0 1" for example.

Rob Ramirez's icon

yeah, there's no color attribute of phys.body, so not entirely sure what you're trying to do.
are you referring to the gl.physdraw color?
you can't set individual body colors with physdraw, you have to use gl.gridshape for that.
physdraw is primarily there for debugging and easy visualization of the physics world.

Roald Baudoux's icon

Thanks Mathieu. Seems I must dig into gl objects a bit.