Pawn Sensing to Socket
Someone know how to attach the Pawn Sensing to socket or bone??? (c++ or blueprint)
Thanks in advance!
asked Mar 20 '15 at 08:39 PM in Blueprint Scripting
This works only with an Character, or Pawn (AICharakter). Create a second Pawn Actor and rename it to "sensing". Add a Component PawnSensing in "sensing". In your Character, where PawnSensing should work, you must use SpawnAIFromClass and spawn your "sensing". Then a tickrate must copy the location and rotation of the socket. Or you can use without Tickrate:
As of version 4.19.2 you still can't attach a UPawnSensingComponent to a socket, but you can achieve the same with the following setup: 1. If you don't already have, create a subclass of APawn or ACharacter, whatever Actor should your sensor belong to. 2. Override the AActor::GetActorEyesViewPoint() method to your needs. It should basically populate input parameters with the head location and rotation of your character. 3. Create a subclass of UPawnSensingComponent. 4. Override the UPawnSensingComponent::GetSensorRotation() method to use the FRotator object from the overridden AActor::GetActorEyesViewPoint() method.
And that's about it.
Overridden method in my UPawnSensingComponent subclass:
Overridden method in my AActor subclass:
answered Jun 07 '18 at 08:47 PM
my idea is to put the pawn sensing in a child actor , then attach the childe actor to te bone
answered Mar 20 '17 at 07:50 AM
Follow this question
Once you sign in you will be able to subscribe for any updates here