Download

Announcing Section #1 for Survival Game - Third-person Player Setup

You could add a Box/Sphere/Capsule in your Blueprint so it collides with the ray-cast. I now recall having this issue a long time ago with a weapon model, I ended up with a copy of the model non-skeletal since it didn’t need any of the skeletal info or animations when laying in the environment.

I’ll see if I can find a way that supports skel mesh collision too, I have not looked into how that is handled.

That would be great. I came across the need to use Skel Mesh instead of Static Mesh so i could create a socket for the muzzle etc.

I’ll have to deal with this to support weapon pickups which is scheduled as a feature. So more on this in a later section :slight_smile:

I’m created the thread in the forum https://forums.unrealengine.com/showthread.php?65235-Auto-uv-material-without-deformations :slight_smile:

Awesome i managed to get it working in the end by creating my own Collision Trace Channel.

Section 1 is now available! So download the source and start digging! I’ve put up the project intro page too.

Hey 1 question. Why didn’t you make the Usable behaviour an interface? It only needs to provide a OnUse function and you wouldn’t need to put it in the actor class hierarchy, thus making actor types simpler.

Hi Tom, i have a C++ question, i notice the GetLifetimeReplicatedProps method into ASCharacter class is not defined in the header but all compile fine. How this is possible? I used C++ years ago and i’ not remember all the advanced feature of the language, why we can omit the GetLifetimeReplicatedProps override definition in the header? Is because is override in the parent class (ACharacter)?

Thank.

That function is indeed the exception to the rule. I believe this is thanks to the UnrealHeaderTool that runs before compilation and would add this definition.

Thanks Tom! This is exemplary, and a huge boon for the community. I look forward to the rest of your tutorials.

@Havoc: I believe it is actually declared by the GENERATED_BODY macro :wink:

You might be right! I never checked which of the two handles the backend magic :slight_smile:

Thx a lot, i really like how you have done it, very easy to read and understand and very small too which is really awesome, im excited for the next ones. Good job !

Thanks for the feedback guys!

The structure is very similar to ShooterGame, which I found has a great framework for the character and weapon code.

Hi Tom,

Can you explain how you set the Character Rotation to the Cameras Rotation. Im trying to create this movement in my own c++ project.

See Character.cpp for the spring component that supports the following:

CameraBoomComp->bUsePawnControlRotation = true;

I have this set as true but in my project when i move the camera the character does not face that direction. Also i notice in your project when i set it to true, the character still faces the direction of the camera, but you just can’t look up and down.

Edit:

Use Controller Yaw Rotation is what i was looking for, when i disable it on the Survival Project the character does not rotate according to mouse movement. However, enabling/disabling this on my project has no effect. Any ideas?

Did you setup the proper parent/child hierachy for camera > spring > mesh ?

Ye the component layout is exactly like the Survival Project. The character movement rotates fine when i am Targeting, just doesn’t do it by default

Could be a AnimBlueprint issue perhaps? I would find it a bit strange that it only works while targeting.