Announcement

Collapse
No announcement yet.

ThirdPerson Character Input triggered Actor Animation.

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • replied
    Originally posted by Jeel_884 View Post
    If it's a child. Copy should fail cast.
    RiseBP is AnimInstance

    Leave a comment:


  • replied
    If it's a child. Copy should fail cast.

    Leave a comment:


  • replied
    Click image for larger version

Name:	Desktop-Screenshot-2019.12.06--12.31.37.20.jpg
Views:	67
Size:	403.5 KB
ID:	1695087To reiterate, the cast is from the ThirdPersonCharacter into another mesh skeleton with an animation BP. Is it still viable?
    Last edited by BitXavier; 12-06-2019, 01:34 PM.

    Leave a comment:


  • replied
    Inside your ANIMATION blueprint create a function call it "Update Anim State"

    Click image for larger version  Name:	UpdateState0.jpg Views:	0 Size:	67.8 KB ID:	1694934
    Event blueprint update animation should be keep for variables who need constant updates ( speed, direction), this way you have a clean function just to update your variables.
    Inside your character blueprint:

    Click image for larger version  Name:	UpdateState1.jpg Views:	0 Size:	98.0 KB ID:	1694935

    And that's it. Transitions in your animation blueprint should use variables already set and not use any logic.

    Click image for larger version  Name:	Trans1.jpg Views:	0 Size:	17.1 KB ID:	1694938


    If you want to keep it as the way you did in the first post: set an actor reference after you cast from your character. In your anim blueprint create a variable type "your actor class" (here third person character) and link it to your casting.

    Click image for larger version  Name:	Trans2.jpg Views:	0 Size:	68.8 KB ID:	1694939

    Transitions could be like this: but this is bad.

    Click image for larger version  Name:	aaz.jpg Views:	0 Size:	37.5 KB ID:	1694940

    There is an option to see if you did correctly. In your animation blueprint go to class settings, tick warn about blueprint usage:

    Click image for larger version

Name:	aaaaaa.jpg
Views:	85
Size:	54.4 KB
ID:	1694942
    Last edited by Jeel_884; 12-06-2019, 05:19 AM.

    Leave a comment:


  • replied
    Originally posted by Jeel_884 View Post
    There is no type of function you just create one in your anim blueprint and you call that function from your character. It will replace the event blueprint update animation.
    So, how to call the function from the third person character?
    Attached Files

    Leave a comment:


  • replied
    There is no type of function you just create one in your anim blueprint and you call that function from your character. It will replace the event blueprint update animation.

    Leave a comment:


  • replied
    Originally posted by Jeel_884 View Post
    Are you sure you did it the right way? Just open a new project third person and check the animation blueprint (third person anim)

    Click image for larger version Name:	Cast.jpg Views:	0 Size:	72.6 KB ID:	1694507

    Performance-wise this is not a good way to do it. Your bool variables must be set directly inside the anim blueprint and not use any logic.
    In your project, instead of having a bool variable inside your character linked to another bool variable in your anim blueprint, you should directly in your character blueprint trigger a function inside your anim blueprint which will just set that Rising var to true.
    Later if you don't do this it will take 20 minutes for your anim blueprint to open if you have a lot of states.
    Type of function?

    Leave a comment:


  • replied
    Are you sure you did it the right way? Just open a new project third person and check the animation blueprint (third person anim)

    Click image for larger version  Name:	Cast.jpg Views:	0 Size:	72.6 KB ID:	1694507

    Performance-wise this is not a good way to do it. Your bool variables must be set directly inside the anim blueprint and not use any logic.
    In your project, instead of having a bool variable inside your character linked to another bool variable in your anim blueprint, you should directly in your character blueprint trigger a function inside your anim blueprint which will just set that Rising var to true.
    Later if you don't do this it will take 20 minutes for your anim blueprint to open if you have a lot of states.
    Last edited by Jeel_884; 12-05-2019, 03:48 AM.

    Leave a comment:


  • replied
    Post screenshot of your State machine (Default state ) and new screenshot from event graph.
    To debug after Cast to your player create a new node Print and connect with Bool rise to string (to see output true or false).
    Also connect Print node with Cast failed and manually type "Failed" to see if it's casted to your player or not. Later you can delete these print nodes.

    Leave a comment:


  • replied
    Originally posted by Mr. Wood View Post
    You connect Cast node, but still Is Valid node is not connected so it always fail.
    Connected both, didn't work.

    Leave a comment:


  • replied
    You connect Cast node, but still Is Valid node is not connected so it always fail.

    Leave a comment:


  • replied
    It didn't work, this is the State Machine I have, all I have to do is have the BP read the Trigger.

    Leave a comment:


  • replied
    You did not connect Try Get Pawn owner with Is Valid node and Cast node?

    Leave a comment:


  • replied
    Originally posted by Erico Wiggers View Post
    What happens when you compile? A cast without object parameter should throw an error. At Least this is what I’m able to see from the first perspective, correct me if I’m wrong.
    This was just a print I ran, I do think it needed an Object, the format might not be right.

    Leave a comment:


  • replied
    What happens when you compile? A cast without object parameter should throw an error. At Least this is what I’m able to see from the first perspective, correct me if I’m wrong.

    Leave a comment:

Working...
X