Giter Site home page Giter Site logo

animationactorsystemdocs's Introduction

Banner

Animation Actor System

To get started you can find the QuickStart here

The main functional unit in the Animation Actor System is the AnimNotifyState TimedSpawnActor(UAnimNotifyState_SpawnAnimActor).

Image of the NotifyState

This NotifyState is ready to use out of the box and should provide enough flexibility for most usecases.

If desired its baseclass UAnimNotifyState_SpawnActorBase can be extended with custom functionality like actor handling and custom component settings.

AnimNotifyState TimedSpawnActor

Both the ActorData and the ConstructionData can be simply disabled for the NotifyState using the corresponding boolean flag.

Actor Data

Image of the ActorData

The ActorData-property is used to assign a list of already existing actor classes. For each entry in the list, a corresponding actor of the specified class will be spawned and attached as per specifications.

Construction Data

Image of the ConstructionData

The ConstructionData-property is used to dynamically create actors(these will be of class AAnimActor) from a list of construction data comprised of data that describes skeletal mesh components, data that describes static mesh components and their relationships.

While most of the settings should be self explaining as they are used in the same context as when the components are created by hand, the main properties defining the relationships between the components are AttachTo and AttachComponentIndex. As both skeletal and static data are arrays, the AttachComponentIndex refers to the index the corresponging component should be attached to. Similarly AttachTo refers to which of the two data types the AttachComponentIndex refers.

Consider the follow setup: We are setting up a static mesh component, setting AttachTo to skeletal, AttachComponentIndex to be 2, and the AttachSocket to "hand_l". In that case the static mesh component we are setting up, will be attached to the socket "hand_l" on the component created by index 2 in the SkeletalData ist.

The combination of a list of SkeletalData and a list of StatiData will be created in a single actor which can then be treated as such going forward.

Of course, just as with the ActorData, the ConstructionData can contain multiple actors with different setups, attachements, and offset-transforms.

Project Settings

The added project settings allow global control over different properties. A more detailed view of the project settings here. Image of the project settings

Extending UAnimNotifyState_SpawnActorBase

Extending the baseclass can be done both natively as well as in Blueprints. In Blueprints this is done by implementing the event BlueprintSpawnActors. Natively virtual void SpawnActors( USkeletalMeshComponent* MeshComp, TArray<AActor*>& SpawnedActors); should be overriden. Both have SpawnedActors as an output defined. Any actor that gets spawned should be added to that array, so it can be destroyed once the NotifyState ends.

AnimActor Destruction Interface

The system provides the interface IAnimActorDestructionInterface to be implemented in any actor that you want to spawn via the UAnimNotifyState_SpawnActorBase. This is optional, you can assign any actor when spawning, independent whether it implements the interface or not.

It contains the method RequestDestruction that allows the actor to return a bool when the notifystates requests to destroy it. By default this will return true which tells the notifystate to to go on and destroy it, when the NotifyState ends.

If false is returned the actor will not be automatically destroyed. Then it is up to the actor/an external system to destroy it.

animationactorsystemdocs's People

Contributors

kaaaron avatar

Stargazers

Miquel Campos avatar kirill avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.