x

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"

Office Holiday

Epic Games' offices will be on holiday from June 22nd to July 7th. During this period support will be limited. Our offices will reopen on Monday, July 8th. 

[Question] Is there a equivalent to AimNode?

In UDK we had AimNode in AnimTree which we can use to move certain bones with the camera. Is there a equivalent to this in UE4? Am using a single third person mesh and i have place the camera on characters head. But only the Yaw movement is updated. When i look up/down the camera moves but the players head wont follow it. Is there any way i can make certain bones (in my case i want Neck bone) move with the camera?

Product Version: Not Selected
Tags:
more ▼

asked Mar 11 '14 at 05:08 AM in Everything Else

avatar image

ue4-archive ♦♦ STAFF
49.9k 3666 1994 9120

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

3 answers: sort voted first

Plugin For You

Dear Satheesh,

alt text

I turned my BP library into a plugin

Now you can get my Aim Offsets BP Node WITHOUT having to compile any code!

Can be used in content only project!

http://forums.epicgames.com/threads/977316-Rama-s-Blueprint-Function-Library-As-a-Plugin-For-You!-No-Code-Compile-Required

Also features a Get-Recently-Rendered-Actors function, so you can tell what is being rendered and what isnt :)

alt text

Rama

aimoffsets.jpg (257.1 kB)
more ▼

answered Mar 11 '14 at 05:08 AM

avatar image

ue4-archive ♦♦ STAFF
49.9k 3666 1994 9120

avatar image ue4-archive ♦♦ STAFF Mar 11 '14 at 05:08 AM

You are simply great Rama. Awesome work mate! :)

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

See my Plugin for You answer

There is a very clear way to do what you want using Blend Spaces

If you look at the shooter game code you will see exact details.

I've fully implemented all directional aiming with the mouse using blend spaces and single frame animations for each of the 9 positions

alt text

From what I've read of your posts, you dont have easy access to shootergame example, so let me explain

Create 9 poses for

facing forward

facing up

facing down

facing left

facing right

facing upper right

facing lower right

facing lower left

facing upper left

Create these single frame animations in 3ds max by positioning character accordingly.

Then import the 9 animations

then turn them into a blend space using the following blend space setup

alt text

alt text

alt text

More numbers

the center is 0 0

straight to the left is yaw -90, pitch = 0, you get the idea

Calculating the Pitch and Yaw

then you need calculate what the aim offsets should be

this involves a bit of c++,

though once you see the c++ you can probably figure out the blueprint version to run in your anim instance event graph

 //I turned this into pseudo code for your blueprint adaptation, I got this from shootergame originally
 void AVictoryCharacterBase::SetAimOffsets()
 {
     //pc rot
     FVector LookDir = PlayerController->GetActorRotation().Vector();

     //some background info by me
     //Inverse of ActorToWorld matrix is World to Actor Local Space
         //so this takes the direction vector, the PC  rotation as vector
         //and outputs what this dir is 
         //in local actor space &
         //local actor space is what we want for aiming offsets
         
     FVector LookDirMadeLocal = ActorToWorld().InverseTransformVectorNoScale(LookDir);
     FRotator LookDirAsRotation = LookDirMadeLocal.Rotation();
         
     //Pass out Yaw and Pitch to Anim Instance for Blendspace
         //or in the blueprint case, makes these vars on your anim instance
         //make sure name is same as used by blendspace
     AnimationBase->VictoryAimYaw = LookDirAsRotation.Yaw;
     AnimationBase-> VictoryAimPitch = LookDirAsRotation.Pitch;
 }


more ▼

answered Mar 11 '14 at 05:08 AM

avatar image

ue4-archive ♦♦ STAFF
49.9k 3666 1994 9120

avatar image ue4-archive ♦♦ STAFF Mar 11 '14 at 05:08 AM +

My Attempted BP

I could not find a BP equivalent to

InverseTransformVectorNoScale

so I made what I think is an equivalent

I've not tested it though

basically I am using a transform, made in the animbp

I reset it to 0 every tick because then I ADD the actor local transform

and then convert the Player Controller's look direction with the actor local transform

I think this is equivalent to the c++

but not sure :)

alt text

Rama

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

See my Plugin For You Answer

AimOffset Blueprint Function Library For You

I've tested with my own project that these Blueprint Aim Offset functions work!

So now I've done the hardest part for you, see my other answer for the rest of the process :)

Rama's Blueprint Function Library - Aim Offsets, Thick 3D Lines, and More!

http://forums.epicgames.com/threads/977316-Rama-s-Blueprint-Function-Library-For-You-Aim-Offsets-Draw-Thick-3D-Lines-amp-More!?p=31710453&viewfull=1#post31710453

~~~

Current List of Functions

Aim Offsets, For Use With Blend Spaces in probable range of -90,90 to 90,90

GetAimOffsets - Original Inspiration for this BP Library, This is a Blueprint version of the same core c++ code as Shootergame uses. With this function you can create a blendspace using 9 animations for the nine directions to create an equivalent of the UE3 Aim Node. You plug the results of this function straight into your Aim Blendspace. See Shootergame example for exact details.

GetAimOffsetsFromRotation - Instead of assuming you want to get the character's aim based on the controller, you can use this version to supply the rotation in world space that you want the character to aim to.

Drawing 3D Lines of Chosen Thickness

Thick3DLineBetweenActors - Draw a 3D line of your chosen thickness and duration between two Actors! You can use the BP color pick to pick line color!

Thick3DLineFromCharacterSocket - Draw a 3D line of your chosen thickness and duration from a specified Character Mesh Socket to your chosen destination. You can use the BP color pick to pick line color!

Thick3DLineFromSocket - Same as above, but you can use any mesh of your choosing.

Conversions RotatorToVector VectorToRotator

Convenience GetControllerRotation - Get the Character's controller's rotation, fast way to get PlayerController or AIController rotation!

File IO SaveStringTextToFile - Save human-readable text to a file of your choosing.

more ▼

answered Mar 11 '14 at 05:08 AM

avatar image

ue4-archive ♦♦ STAFF
49.9k 3666 1994 9120

(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