playcanvas / playcanvas/engine

Add tags to anim state graph states

Open
#4,907 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

area: animation enhancement
Dominant language
JavaScript
Stars
16.8k
Forks
2k
Avg merge
4h 32m
Merged PRs (30d)
222

Description

There are times where I don't want to do something based if particular animations are playing. However, it's not great to have to check against every state name.

In this example, I have two attack states where I don't want to process any input while they are playing

image

For now, I've been checking against the state name and having a defined naming scheme

image

But what would be ideal is that we could tag the states like we do with Entities and Assets so I can check if we are in a state that has an 'attack' tag instead.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the anim state graph state implementation and the existing Entity and Asset tagging code. Compare how tags are defined and queried, then determine where state tags and tag checks should fit. Done means states can be assigned tags and callers can identify whether the active state has the requested tag.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
game-dev
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.