Forums > Jitter

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

March 17, 2013 | 11:26 am

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).

March 17, 2013 | 11:31 am

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 ?

March 17, 2013 | 12:51 pm

you can assign color directly on the gl object not "phys" object…

March 17, 2013 | 1:15 pm

Which gl objet ?

March 17, 2013 | 1:31 pm

" @color 0 1 0 1" for example.

March 17, 2013 | 4:46 pm

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.

March 17, 2013 | 4:59 pm

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

Viewing 7 posts - 1 through 7 (of 7 total)