Announcing Section #3 for Survival Game - AI & Behavior Trees

Section 3 docs are now available on the Wiki! RIGHT HERE

Well! Tomorrow i will look into doc and code :slight_smile:

P.S.
Shared on Reddit

Oh man this awesome I’m gonna start digging through all this right now. Thank you again so much !

Thanks for this! =)
This is not relevant to this project so I’m sorry if its off topic, but i am using this project as a base for learn and implement some stuff.
Im trying to get it work with a FPS camera, and for aiming i am using a camera on the weapon, and blending between them with:

(Weapon.cpp)



Cast<ASPlayerController>(MyPawn->GetController())->SetViewTargetWithBlend(this, 0.20f, VTBlend_Linear, false);


For some reason when i do that i get this problem:

I suspect that the issue could be related to the calculation of the pitch on SCharacter:



FRotator ASCharacter::GetAimOffsets() const
{
	const FVector AimDirWS = GetBaseAimRotation().Vector();
	const FVector AimDirLS = ActorToWorld().InverseTransformVectorNoScale(AimDirWS);
	const FRotator AimRotLS = AimDirLS.Rotation();

	return AimRotLS;
}


(whitch is used on the animblueprint for aiming calculation, breaking the FRotator)

So do you know if the change of camera can somehow cause this problem?, I have this problem since a few days ago

Again i am sorry if the question shouldn’t be here, and thanks again for this project, it’s really helpful!

Alex.-

@ is possible to view something about bullet penetration through the walls with different materials and how manage with different models/walls thickness?

I’d love to make that some time, don’t think it will make it into the 6 sections though…

Thanks for reply, nice to know that will be nice, now i waiting to see how you manage the camera transition smooth at crouch and the run/crouch anims for the next Section #4 ?
The AI and the Section #3 looks nice, nice work.

Shooting Angles of Players

Hi ,
These C++ tutorials and discussions are very helpful. The other day, I was just tinkering with the networking aspect of the project, and I found some differences in the shooting angles of the multi-players, you can check it using two players. The way it appears, if you look at the two screens using two players simultaneously while shooting one of them, you can see the angle is way off from the two distinct point of view. I wonder why is that ?

That’s true, I need to fix that issue. It’s because player 1 shoots from center screen and player 2 sees player 1 shooting from his weapon barrel instead. But I don’t adjust the angle to account for that difference.

Hey !

While testing, I noticed that RifleImpactEffectsXXX Never gets removed from the actor list.
I couldn’t test with the latest version of the game (Sorry!), but this seems important enough to report here!

How to reproduce: Start the game in the editor, shoot into something (e.g.: the ground). A new Actor based on RifleImpactEffects will be created, but won’t ever be removed.

Hope it helps! :slight_smile:

Hi! Thanks for reporting this, It’s on the buglist to get fixed soon.

,

I had someone show me this tutorial and I had a couple questions.

Why did you create sub-objects for both the blackboard and the behavior tree in the controller? If I call run behavior tree, it creates a blackboard and behavior tree and assigns it to the “BrainComponent” in on the “AAIController” class.

Why use pawn sensing? I thought perception was supposed to be used. I forget what version that was suggested.

Using the AI debugging tools (pressing the " key) it did not look as if the AI was actually running a behavior tree. I saw the behavior tree running, but the debug tools showed it as not working.

Hi Murphy,

  1. The extra components don’t seem required in hind-sight. I discovered the BrainComponent after I did the AI implementation.

  2. I used Pawn Sensing since at the time of the tutorial the perception system was very new, and still WIP. Pawn Sensing has all the features we need and is easy to understand and use.

Hope that helps!