Collisions do not work with my Physics Asset. . .and it really is disappointing. It shouldn’t be that hard to set it up correctly in UE and have it work. How many options can there be? If you want to know more look for my postings in C++ Forums and here on Answer HUB.
Is there a simple tutorial that shows a mechanical skeletal mesh that collides properly?
In Unity I had it up and running within a few hours. For UE, however, I’ve spent days trying to get this to work properly. And it doesn’t.
If you do a tutorial, show more than just bouncing off the wall, how about being hit and destroyed.
But how do you make skeletal mesh collisions work with other than character? Basically, using Pawn.
For the record, I’m also using FloatingPawnComponent too, which btw is seriously undocumented, so I’m not sure if that is causing the problem.
As I noted in another posting this is still a work-in-progress but at least now I do get collision notifications with a physics asset with limited collision geometry (BOX) and no animation using the following:
.h
UFUNCTION()
void OnHit(AActor* SelfActor, AActor* OtherActor, FVector NormalImpulse, const FHitResult& Hit);
.cpp
{
OnActorHit.AddDynamic(this, &AMyPawn::OnHit);
}
void AMyPawn::OnHit(AActor* SelfActor, AActor* OtherActor, FVector NormalImpulse, const FHitResult& Hit)
{
FColor DisplayColor = FColor::Yellow;
const FString DebugMessage(OtherActor->GetName());
GEngine->AddOnScreenDebugMessage(-1, 5.0f, DisplayColor, DebugMessage);
if (OtherActor)
{
if (OtherActor->IsA(AMyBullet::StaticClass()))
Destroy();
}
}
Trying to be consistent, I converted my projectile class to use the same technique but now it’s not colliding with anything. Prior to my modification I could hit everything but I wanted to move away from the dependency of the C++ code having to create the collision component and attach the event handler to it.
Hello ,
What type of actor is your bullet and how are you setting up your collisions / physics assets? To achieve some simple collision with Skeletal Meshes inside of a Pawn, you can add a Skeletal Mesh component, set the skeletal mesh (ensuring that the skeletal mesh has a physics asset set) and then set the collision to BlockAll. Are you having any problems getting the collision to work or is it only issues related to hit events not firing?
We haven’t heard from you in a while, . Are you still having problems implementing this functionality? If so, please let me know and I’ll be happy to help. In the meantime, I’ll be marking this question as resolved for tracking purposes.
Hello 
I think I have this resolved now. I am, however, having issues with:
- swapping out materials when spawning actors
- finding good documentation or examples on using Floating Pawn Component
- retrieving and updating a leaderboard (own server for now)
- an easy health bar (or do I need to create my own)
Once I get these done, assuming AI with the floating pawn is easy enough, then I’ll be ready to ship a demo. The word demo is used loosely here in the sense that the game calls for nine levels, while we currently have a trail level available. We are waiting on better assets too. I’m trying to complete the gameplay side of things then I can hunt for the assets.
Are you able to help me with any of the above?
I’m sure you can find help with those issues but 1, 3, and 4 would be best suited for the Using UE4 section.
For the material issue, I would suggest looking into material instances and material instance dynamics as they may be your best bet for swapping out materials and cost much less performance-wise.
For the health bar in particular, this tutorial should be able to help you with that and possibly other things: A new, community-hosted Unreal Engine Wiki - Announcements - Epic Developer Community Forums
Unfortunately there isn’t much documentation for the Floating Pawn Movement component at this time but I will put in a request to have some created.
Hey , thanks for asking about the documentation for the Floating Pawn Component. That is the highest priority right now, and definitely a show stopper.
I just implemented the Health Bar, which was surprisingly easy, using the progress bar as done here:
https://docs.unrealengine.com/latest/INT/Engine/UMG/QuickStart/2/index.html
I’ll take a look at the material instances (dynamics). Another term comes to mind too, Material Collections I believe, but I’m just in the early stage of researching it. Of course I’d like to just knock out right away without the added fuss that doesn’t apply to my situation.