Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

How to attach the "pawn sensing" component to a bone?

Hi, I'm looking for a way to attach the pawn sensing component from a pawn to a bone. Like for exemple to have the pawn sensing cone following the head. So far, I wasn't able to move the pawn sensing component in my viewport, nor being able to attach to anything.

Product Version: Not Selected
more ▼

asked Mar 23 '15 at 11:57 PM in Blueprint Scripting

avatar image

118 11 13 20

avatar image fudo Oct 27 '15 at 09:26 AM

I'm trying to do the same thing, can anyone help?

avatar image Hobgoblin101 Nov 24 '15 at 08:13 AM

I would like this too

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

Hi everyone,

I just tested this in 4.10.2 and the Pawn Sensing component comes in located at the head of the character. If you aren't seeing this behavior in this version, please post back to let me know and provide screenshots showing the issue.

To answer the original question, no, the Pawn Sensing component can't be attached to a bone through blueprints. If you need to alter the location, it will need to be changed though code.



more ▼

answered Jan 27 '16 at 06:41 PM

avatar image

41k 1009 183 494

avatar image Hobgoblin101 Jan 28 '16 at 03:09 AM

Okay, that works for now, by what if I want an AI to turn it's head to look rather that turning the character? Would I have to rotate the character then rotate the mesh the opposite way so you don't see it moving all while doing the animation?

avatar image fudo Jan 28 '16 at 08:23 AM

Thank you @TJ, I'm still using version 4.9, today I'll check if passing to 4.10 does't mess up my project and tell you.

@Hobgoblin101: I think in your case you could just move your charachter's head bone trough an animation or a blueprint script.

avatar image TJ V ♦♦ STAFF Jan 28 '16 at 02:13 PM

The Pawn Sensing component is not a 'scene component' so it technically doesn't exist like other components (Ex. Skeletal Mesh, Camera, etc). It isn't locked to the head bone but it has just been adjusted to be placed at the heads approximate location on a standard character. Once again, to change this behavior, it would need to be implemented through code.

avatar image EddieEllis Jan 28 '16 at 02:35 PM

Does anyone know how this is done in code ?

Alternatively i guess the only other option is to also have a line trace from a socket in the head, while the character is turning the head and looking around.

avatar image TJ V ♦♦ STAFF Feb 16 '16 at 08:13 PM

Hi Eddie,

I spoke with our AI system expert on this.

Basically, the PawnSensingComponent is a simple and convenient way for many people to get up and running. However, it's not possible to attach it to a bone and have it work as you are expecting. It would still use head location as the sensing location.

Instead we suggest using the AI perception system. We don't currently have extensive documentation on this but you can find other users on the Forums and AnswerHub that are discussing it's setup.

avatar image fudo Feb 17 '16 at 11:10 AM

i'm checking it out now, and have some questions, but first i'll try to dig it deeper. Anyway, thanks a lot for the helps!

avatar image Hobgoblin101 Feb 17 '16 at 08:30 PM

Would I be correct it saying that the sight component of it is just a overlap cone effectively? Probably doing a check to see how lit the object is to see if it is actually possible to see it? So I guess if I was the pawn sight component to be attached to the head for rotations, then I should / could make my own.

avatar image fudo Feb 17 '16 at 09:09 PM

Probably the basic idea is this, but I assume there are some optimizations and stuffs, because checking collisions every tick may be overburdening if there are lot of pawns oding it.

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question