How to rotate Pawn Sensing component?

Hi devs . I got a drone which sould search for Enemies , but i cant really rotate Pawn Sensing component to face down not forward , is there any solution ?

Hi there,
Typically, you have 2 options:

  1. You can increase the vision angle to cover 360º.
  2. Or if you attach the pawn sensing to another actor and make this actor a “child actor” your enemy BP, you can rotate it.

Hi! Can I ask something related?

I’m learning UE and now I want to make an enemy drone that run over the floor and follows the player when it sees him.

I made it in a BP of type character called BP_GroundEnemy to use AI MoveTo when it detects the player. Till here it works. But when I attach another BP actor of type Pawn then it appears to block it’s parent BP.

This is the internal structure of my BP:

imagen

I want to attach the pawn sensing on the BP_EnemyHead instead of the root to rotate the head and rotate the pawn sensing.

I can’t use AI MoveTo when I have a child BP of type pawn?

PD: sorry for my english, it’s not my native language.

Hi there,
If I understood correctly, you want to add a pawn sensing component to your BP_EnemyHead and create the AI logic from there. Inside your BP_ground enemy, remove the Pawn Sensing component, and attach the Child Actor to the mesh by dragging and droping over the “Mesh (CharacterMesh0)” and select the head bone in the bone hierarchy list in the details panel. That should work. Also, the pawn sensing component has a sight angle that can be adjustable to create a vision range.

Hope that helps.

Hi!

I will try it. I was trying to avoid (for now) to make a skeletal mesh with bones because I was just trying to do it with cubes to make a prototype of my game.

I will try with some assets from the Asset Store.

Thank you very much!

1 Like

Hi! I’ve made a test with a mesh with a pivot bone for the head.

I have two blueprints:

  • BP_GroundEnemy: is a character type blueprint where to put the base tank and move the enemy.
  • BP_GroundEnemy_Head: is a pawn type blueprint with the Pawn Sensing component and a head mesh. I’m using Pawn type BP because I can’t attach the Pawn Sensing component in a normal blueprint.

I put the BP_GroundEnemy_Head as a child under “Mesh” inside my BP_GroundEnemy blueprint. I setup the Parent Socket for the head as “Mount_Top” that is the socket for this “tank” head skeletal mesh.

Then I put the Pawn Sensing component inside the head:

I’ve make the logic to detect the player with the AIMove to in the BP_GroundEnemy when the head detect him:

But it moves weird and head is not on the top of the tank:

I’m a bit lost… sorry. Maybe I can’t use a pawn actor inside a character blueprint?

Thanks a lot for the help!