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"

How to Properly Handle Instanced Static Mesh Collision?

I've successfully created the Instanced Static Mesh Component. However, the character is falling through the terrain even with the collision setup below:


         UStaticMesh* Rockmesh = LoadObject<UStaticMesh>(nullptr,TEXT("StaticMesh'/Game/StarterContent/Props/SM_Rock.SM_Rock'"));

         ismc->GetBodySetup()->CollisionTraceFlag = ECollisionTraceFlag::CTF_UseComplexAsSimple;
         ismc->CanCharacterStepUpOn = ECanBeCharacterBase::ECB_Yes;
         ismc->CanCharacterStepUp(UGameplayStatics::GetPlayerPawn(this->GetWorld(), 0));
         ismc->bGenerateOverlapEvents = true;

         AForestController* ForestController = GetWorld()->SpawnActor<AForestController>();

AForestController is just an actor that manages the terrain generation, and ismc is a UInstancedStaticMeshComponent variable. I've heard Instanced Mesh Component supports collision. What is the proper way to handle the Instanced Static Mesh Collision, so that the character won't fall through the mesh? Any help towards this is appreciated!

Product Version: UE 4.18
more ▼

asked Jul 06 '18 at 02:32 PM in C++ Programming

avatar image

35 3 3 10

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

1 answer: sort voted first

The code above actually works. My character was spawned underwater. Silly me!

more ▼

answered Jul 07 '18 at 03:04 AM

avatar image

35 3 3 10

(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