Is it Possible to Detect Meshdrawer Collisions?

I’m just wondering if it was possible to detect if a meshdrawer has collided with a model or actor in Panda3D. I couldn’t find anything related like this so I’m just quickly asking here. :sweat_smile:

Thanks!

I noticed that the panda has a misinterpretation of the mesh and collision. This is completely unrelated, you need to use either the collision primitives, or the special geometry obtained in the blender.

can you please explain what you mean by this?

mesh and collision are different concepts.

all I want to do is detect if my meshdrawer beam is hitting the model. Is this possible, yes or no?

Yes

https://www.panda3d.org/manual/?title=Collision_Detection

but I can use use the collision system for mesh? I know for actors and models, but for mesh? or put it on the actor, but then will it detect the mesh?

I know that this is possible for the EGG format, you need to register the necessary flag. And when loading, geometry is created for the collision.

so like maybe a collideflags{}? or something

This is for static geometry, loaded through the loader.

The actor is active geometry, and the ray was created programmatically. I would use:
https://www.panda3d.org/manual/?title=Collision_Detection

for the mesh or model? the model right?

If anything, the model consists of a mesh of polygons.

no, what do I apply the collision detection on? the model or mesh?

for anything you need

for my situation, what would I apply it on? I want the model to detect if the mesh has collided with it

In fact, a collision system is used for this. But not a visible grid.
What confuses you is that it is possible to create a collision grid from visible geometries. But as I answered it for EGG.

Correct me if I’m wrong, are you saying just apply the collision detection system to the .EGG model?

Yes, but pay attention to your other case.

Contrary to what has been suggested in this thread, the collision system is able to collide with visible geometry. It is not necessary to convert to .egg or construct collision solids, even though it is more efficient to do so.

You can set an “into” collision mask on any visible geometry node.

As far as I know, this is the same collision system that transforms everything that it sees.