x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

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

Product Version: Not Selected
Tags:
more ▼

asked Nov 08 '14 at 05:40 PM in C++ Programming

avatar image

Maddius
146 14 20 24

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

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 https://wiki.unrealengine.com/Procedural_Mesh_Generation.

Best regards, Gleb

more ▼

answered Nov 14 '14 at 08:26 AM

avatar image

Gleb.Bulgakov
1.8k 76 19 143

avatar image Maddius Nov 14 '14 at 08:02 PM

Thanks for the info Gleb, 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

avatar image Maddius Nov 18 '14 at 03:00 PM

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

avatar image Gleb.Bulgakov Nov 20 '14 at 10:18 AM

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, Gleb

avatar image Maddius Nov 27 '14 at 10:28 AM

Hey Gleb,

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

avatar image Gleb.Bulgakov Nov 27 '14 at 02:30 PM

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, Gleb

avatar image Maddius Dec 07 '14 at 08:20 PM

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

log.txt (58.3 kB)
avatar image Gleb.Bulgakov Dec 10 '14 at 10:00 AM

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, Gleb

avatar image Maddius Dec 10 '14 at 10:18 PM

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

newlog.txt (34.1 kB)
avatar image Gleb.Bulgakov Dec 15 '14 at 01:44 PM

Hey, Maddius.

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

avatar image Maddius Dec 15 '14 at 02:07 PM

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

avatar image shpen Mar 13 '15 at 05:54 AM

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

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question