UCustomMeshComponent Collision

Hey,

I have a visually working UCustomMeshComponent however it doesn’t respond to collision for example if I probe under the mouse cursor the mesh doesn’t get hit. I’ve tried:

m_customMesh->SetCollisionEnabled(ECollisionEnabled::QueryAndPhysics);
	m_customMesh->SetCollisionProfileName(UCollisionProfile::BlockAll_ProfileName);

But this doesn’t seem to help.

How can I correctly attach / enable the collision for this mesh? The visual geometry will suffice since it is very simple.

Thanks

Hello Maddius,

Standard UCustomMeshComponent has not collision. To do that you should create class derived from CustomMeshComponent and IInterface_CollisionDataProvider. Then you should implement next functions: GetPhysicsTriMeshData, ContainsPhysicsTriMeshData, WantsNegXTriMesh, GetBodySetup. For example of implementing this function look at modified GeneratedMeshComponent.h in this link A new, community-hosted Unreal Engine Wiki - Announcements - Epic Developer Community Forums.

Best regards,

Thanks for the info , sorry I’ve been so blind on this one I have got collision working in editor and if I launch on Windows.

However It doesn’t seem to work if I deployed to my Android device, I’m not sure if this post is discussing what I’m talking about?

I’ve also noticed that in UEBuildAndroid.cs there is a bRuntimePhysicsCooking which is false but if I set it to true I can no longer deploy to my Android device, does this sound like some kind of setup issue here?

Thanks

Bumpy bump. Would be good to know how to get the runtime cooking going on Android.

Hi Maddius,

Sorry for delay. Yes, It is what you are looking for.

I tested on 4.5. I have same issue with application deploy. In my case packaged apk and deployed have different names. Could you provide me log to ensure that’s the same problem?

Best regards,

Hey ,

Sorry for the delay, I haven’t had a chance to test but i’d imagine it’s the same issue. How do I fix or will it be fixed in a new version?

Thanks

Hey Maddius,

We will enter a bug report for it. I can reproduce it only on Android x86 (on Android armv7 everything is good).
I wonder did you get apk file. In this case you can try to manually deploy application.
If you are using armv7 android and experiencing this issue, please give me build log and deploy log.

Best regards,

Hey,

I’ve attached the log, I hope that is useful.

I’m not seeing an APK if I go via the File > Package route, how do I choose between x86 and x64 for building Android because perhaps I’m stuck on x86 is it within a settings menu somewhere?

Thanks

Log

Hey Maddius. Unfortunately, it is another problem.

To avoid this error you should:

  • Enable physx cooking UEBuildAndroid.cs line 178

  • Uncomment static library for android cooking in PhysX.Build.cs line 224

  • Also check if exist PhysX library(libPhysX3Cooking*.a) on android in \Engine\Source\ThirdParty\PhysX\PhysX-3.3\lib\Android\ARMv7

  • Rebuild android project

Best regards,

Thanks for the info, seem to be getting closer, but it seems like my libs are out of date as I get missing symbol errors from within the libs, where can I get the latest versions? If I upgrade to 4.6 will this be magically fixed?link text

Hey, Maddius.

I wonder did you add/disable some compiler options. Had you problems with cooking library(was it missed?).

I haven’t actively changed anything, how can I check, can I supply you with log/project or the like so you can check?

Can we get an update on this? I am having similar issues, but I cannot get collisions to work on any deployment outside of the editor, and I cannot find any reference to “UEBuildAndroid.cs.” I am on v4.7.2