Collision mesh always visible

5 views
Skip to first unread message

Joel Vedrenne (Ensam)

unread,
Jun 26, 2012, 4:39:34 AM6/26/12
to dtenti...@googlegroups.com
Hi all,

We actually use a collision mesh into one of our scenes. Technically, all is working fine but it seems not possible to make the collision mesh invisible.
We try the Visible (true to false) property of the Map component but nothing happens and the 2 meshes (3D and collision one) are visible at the same time...

Is there a trick to do that ?
Is this a little "bug" ?

Thanks for your help.
Joël.

Martin Scheffler

unread,
Jun 26, 2012, 4:52:45 AM6/26/12
to dtenti...@googlegroups.com
Hi Joel,
is the collision mesh component derived from node component?
The map component has a property VisibleInEntityList that can be used
by GUIs to determine if an entity should be shown in an entity list.

The Visible property in the layer component can be used to toggle
visibility of the NodeComponent attached to the layer component. So if
you have a PositionAttitudeTransform component and a Layer component
and the PAT component is the AttachedComponent of the layer component
then toggling the visibility of the layer component will modify the
node mask of the PAT node in the PAT component.

I would suggest adding a custom node mask for debug geometry (see
nodemasks.h) and modifying the cull mask of the camera(s) to toggle
the visibility.

Cheers,
Martin


2012/6/26 Joel Vedrenne (Ensam) <Joel.V...@ensam.eu>:

Joel Vedrenne (Ensam)

unread,
Jun 26, 2012, 5:13:35 AM6/26/12
to dtenti...@googlegroups.com
Hi Martin,

Thanks for your response. Here are some précisions of my config:

For now, my collision mesh is an Entity with some Components: a Map, a PAT, a Static mesh and a PhysX one.
The Layer points to PAT, that has a child (Static Mesh with its coll mesh).

Is it correct ?

I also try to toggle (false) the VisibleInEntityList but the coll mesh is always visible.

Thx.
Joël.

Martin Scheffler

unread,
Jun 26, 2012, 5:15:05 AM6/26/12
to dtenti...@googlegroups.com
Hi Joel,
please try toggling Layer::IsVisible property instead

2012/6/26 Joel Vedrenne (Ensam) <Joel.V...@ensam.eu>:

Joel Vedrenne (Ensam)

unread,
Jun 26, 2012, 5:26:21 AM6/26/12
to dtenti...@googlegroups.com
Sorry Martin but in the Editor, I don't have isVisible property into the layer Comp.
So, should I do that into my code ?

Another test: I tried to directly attach the Static Mesh Comp to the Layer Comp but the result is the same: with Visible Prop to false, the coll mesh is always here ;o) !

Joël.

Martin Scheffler

unread,
Jun 26, 2012, 5:28:46 AM6/26/12
to dtenti...@googlegroups.com
The property in the layer component is called "Visible". Is it really not there?

Joel Vedrenne (Ensam)

unread,
Jun 26, 2012, 5:42:34 AM6/26/12
to dtenti...@googlegroups.com
Yes Martin, the Visible property is fortunately here !!!

I'm going to look the LayerComponent class. I put break points onto IsVisible() and SetVisible() to see what happens.

++
Joël.

Joel Vedrenne (Ensam)

unread,
Jun 26, 2012, 10:16:19 AM6/26/12
to dtenti...@googlegroups.com
Hi Martin,

I'm really sorry but the collision mesh is always visible.

When I try to debug the IsVisible() and the SetVisible() methods, all seems to be good and the Nodemask is correctly set to false by this line:

===> GetAttachedComponentNode()->setNodeMask(GetAttachedComponentNode()->getNodeMask() & ~dtEntity::NodeMasks::VISIBLE);

I do not have any PAT but just a StaticMeshComponent links to the Layer (with visible to false) but the coll mesh is here.

I try to set manually to false the Visible prop of the Layer (by calling SetVisible(false)) into my code but it doesn't work.

Could you help me ?

Thanks.
Joël.


Le mardi 26 juin 2012 10:39:34 UTC+2, Joel Vedrenne (Ensam) a écrit :

Martin Scheffler

unread,
Jun 27, 2012, 2:40:18 AM6/27/12
to dtenti...@googlegroups.com
what is the cull mask of the camera set to? It has to be set to
dtEntity::NodeMasks::VISIBLE so that the VISIBLE bit on the node mask
is respected. Maybe you can set a break point in
CameraComponent::SetCullMask and check if it is set to something
different

2012/6/26 Joel Vedrenne (Ensam) <Joel.V...@ensam.eu>:

Joel Vedrenne (Ensam)

unread,
Jul 4, 2012, 8:34:39 AM7/4/12
to dtenti...@googlegroups.com
Yes Martin, that was the "problem".

We didn't have setted the Camera Cullmask. After done it, all is functionning perfectly !

Thanks.
Joël.


Le mardi 26 juin 2012 10:39:34 UTC+2, Joel Vedrenne (Ensam) a écrit :
Reply all
Reply to author
Forward
0 new messages