Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Directional Animations in 3D #280

Open
KybernetikGames opened this issue May 12, 2023 · 0 comments
Open

Directional Animations in 3D #280

KybernetikGames opened this issue May 12, 2023 · 0 comments
Labels
Enhancement New feature or change request Feedback Wanted Community feedback is desired Solved A solution is available here (but may not yet be included in the latest release)

Comments

@KybernetikGames
Copy link
Owner

Use Case

Some games use a combination of 2D Sprites in a 3D world, for example:

  • Tree of Savior

treeofsavior-english-epl-523

  • Ragnarok Online

download-ragnarok-mobile

Animancer's Directional Animation Sets can do that easily, but Animancer doesn't yet have an example scene to demonstrate the capability.

Solution

Here's a package with a simple example scene that will work with Animancer Lite or Pro: Animancer - Directional Animations in 3D.zip

It has two scripts:

  • DirectionalAnimations3D is the main logic which you would use in a game. Instead of telling Animancer to play a specific animation, you can set its properties and it will use them to decide what to play:
    • Animations is the DirectionalAnimationSet you want it to currently use.
    • Forward is the world space direction the character is facing.
  • DirectionalAnimations3DController is an example script which uses the rotation of an object in the scene to control the DirectionalAnimations3D.Forward direction.

The system chooses the appropriate animation based on the Forward direction relative to the camera so rotating the camera changes the animation:

CameraRotation

And rotating the Forward direction also changes the animation:

DirectionRotation

Feedback

As always, feedback is welcome. This will likely be added as an example scene in the next version of Animancer.

@KybernetikGames KybernetikGames added Enhancement New feature or change request Solved A solution is available here (but may not yet be included in the latest release) Feedback Wanted Community feedback is desired labels May 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement New feature or change request Feedback Wanted Community feedback is desired Solved A solution is available here (but may not yet be included in the latest release)
Projects
None yet
Development

No branches or pull requests

1 participant