screenraytesting + filterclasses bodies

Dec 14, 2013 at 3:10pm

screenraytesting + filterclasses bodies

Hi,

I’m trying to improve my work with Max physic but there is something I am missing regarding (screen-)raytesting.

I have a patch with few bodies with “@filterclass worldbox” so they dont collide each other, but doing so, it seems I cant get them returned by jit.phys.world when using (screen)raytest message. ‘screenraytest’ works fine though when my bodies have “@filterclass all” for example.

Is there an option I am missing to allow screenraytest message and filterclass attribute ?

Thanks in advance.

Best,
Julien

#275742
Dec 16, 2013 at 11:09am

it will be helpful in diagnosing this if you can provide a patch.
thanks.

#275896
Dec 16, 2013 at 12:01pm

Oops, sorry. Here it is.

<code>

– Pasted Max Patch, click to expand. –

</code>

Thanks for your attention.

Best,
Julien

#275900
Dec 16, 2013 at 12:25pm

hi julien.

set the phys.body @filters attribute to “picker default”.
this will allow the bodies to intersect with the raytest.

#275901
Dec 16, 2013 at 12:56pm

Yes, but my bodies will then collide each other which is what I’d want to prevent from (at least for some of them). Cant I add as filters attribute both raytest message and worldbox (thus exclude other bodies) ?

#275903
Dec 16, 2013 at 2:21pm

if you don’t want the bodies to collide with each other, change their @filterclass attribute to something other than “default”.

#275914
Dec 16, 2013 at 2:38pm

*doh* I now realize I mixed up the @name and @filterclass attr while testing things around…. Stupid me !

Thanks a lot for your help !

Best,
Julien

#275917

You must be logged in to reply to this topic.