Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Oppiskele Weapon BP Overview | The Character Blueprint
Unreal Engine FPS Game

bookWeapon BP Overview

In this chapter, we take a look at the BP_Pickup_Rifle and explain how the pick-up mechanics work and what happens when we shoot with the rifle.

BP_Pickup_Rifle has a SphereCollision component once a player overlaps with this invisible sphere, an event called On Begin Overlap fires off which first checks the overlapping actor and makes sure that it is a BP_FirstPersonCharacter, then saves a copy of that and checks if the player already has a weapon in their hands. If they do not, then it adds a component called BP_Weapon_Component to the FirstPersonCharacter.

  • The BP_Weapon_Component is then attached to the hands of the player and then BP_Pickup_Rifle destroys itself.

  • The BP_WeaponComponent handles the logic of spawning a projectile (Bp_FirstPersonProjectile), playing a sound of gunfire and an animation (for the arms).

Oliko kaikki selvää?

Miten voimme parantaa sitä?

Kiitos palautteestasi!

Osio 2. Luku 3

Kysy tekoälyä

expand

Kysy tekoälyä

ChatGPT

Kysy mitä tahansa tai kokeile jotakin ehdotetuista kysymyksistä aloittaaksesi keskustelumme

Suggested prompts:

Kysy minulta kysymyksiä tästä aiheesta

Tiivistä tämä luku

Näytä käytännön esimerkkejä

Awesome!

Completion rate improved to 4.17

bookWeapon BP Overview

Pyyhkäise näyttääksesi valikon

In this chapter, we take a look at the BP_Pickup_Rifle and explain how the pick-up mechanics work and what happens when we shoot with the rifle.

BP_Pickup_Rifle has a SphereCollision component once a player overlaps with this invisible sphere, an event called On Begin Overlap fires off which first checks the overlapping actor and makes sure that it is a BP_FirstPersonCharacter, then saves a copy of that and checks if the player already has a weapon in their hands. If they do not, then it adds a component called BP_Weapon_Component to the FirstPersonCharacter.

  • The BP_Weapon_Component is then attached to the hands of the player and then BP_Pickup_Rifle destroys itself.

  • The BP_WeaponComponent handles the logic of spawning a projectile (Bp_FirstPersonProjectile), playing a sound of gunfire and an animation (for the arms).

Oliko kaikki selvää?

Miten voimme parantaa sitä?

Kiitos palautteestasi!

Osio 2. Luku 3
some-alt