Udon API for Dynamic Control of Player Avatar Animations
nHaruka
Limited control over player avatar animations is a major obstacle when creating action games and other gameplay-focused worlds in VRChat.
Currently, applying world-defined custom animations to players’ own avatars relies primarily on VRCStation. However, its Udon API does not expose direct control over the animation parameters of the station controller running on the player. As a result, controlling these animations dynamically through gameplay logic requires complicated workarounds.
I would like an officially supported Udon API that allows world creators to play and control custom animations on players’ avatars in response to player input and game events. For example, creators should be able to trigger attacks, dodges, and hit reactions, and transition between them as gameplay requires, without requiring players to modify their avatars for each world.
One possible approach would be to allow Udon to set parameters on the station Animator Controller as it runs on the player using that station. This would let world creators drive animation state transitions and blend trees directly from their game logic. I am also open to other API designs that provide equivalent control.
With the introduction of built-in third-person view on desktop, this limitation has become even more noticeable. Players can now see their own avatars throughout gameplay, making animations that clearly reflect their actions and the game state especially important.
The following example is by another creator. I am sharing it as a reference to illustrate the need for better control over player animations in gameplay:
As a stretch goal, it would be great to allow Udon to control the IK targets of players’ avatars, such as those used by Final IK. This could enable more advanced procedural motion, including dynamically adjusting hand and foot placement to match the surrounding environment. Support for Udon-driven, physics-based avatar motion through PuppetMaster or a similar system would also greatly expand the possibilities for gameplay and animation.
Related request:
Expose Animation Parameters on StationsUdonからプレイヤーのカスタムアニメーションを動的に制御するAPIの追加
VRChatでアクションゲームなどのゲームワールドを制作する際、大きな課題の一つとなるのがプレイヤーのアニメーション制御です。
現在、ワールド側で用意したカスタムアニメーションをプレイヤー自身のアバターに適用する仕組みは、主にVRCStationに依存しています。しかし、プレイヤー上で動作するStationのAnimator ControllerのパラメータをUdonから直接制御するAPIは提供されていません。そのため、ゲームの進行に合わせてアニメーションを動的に制御するには複雑な回避策が必要です。
そこで、プレイヤーの入力やゲーム内のイベントに応じてプレイヤーのアバターにカスタムアニメーションを再生・制御できる公式のUdon APIを要望します。例えば、攻撃・回避・被ダメージ時のリアクションなどをゲームの状態に合わせて再生・切り替えできるようにしてほしいです。また、プレイヤーがワールドごとにアバターを改変する必要なく利用できることを希望します。
実装方法の一案として、Station使用中のプレイヤーに適用されるAnimator ControllerのパラメータをUdonから実行時に設定できるようにすることが考えられます。これにより、ゲームロジックからアニメーションのステート遷移やBlend Treeを直接制御できるようになります。同等の制御を実現できるのであれば別のAPI設計でも構いません。
デスクトップ向けの標準機能として三人称視点が導入されたことでこの制約はさらに目立つようになりました。プレイヤーがゲーム中に自分のアバターを継続的に見ることができるため、操作やゲームの状態を適切に表現するアニメーションの重要性が高まっています。
以下は私が制作したものではありませんが、ゲームにおけるプレイヤーのアニメーション制御の必要性を伝える参考例として紹介します。
またさらに発展的な要望として、Final IKのターゲットなど、プレイヤーのアバターのIKターゲットをUdonから制御できるようになることも期待しています。手足の位置を周囲の環境に合わせて動的に調整するなどより高度で柔軟なモーション表現につながると考えます。加えて、PuppetMasterなどによる物理ベースのアバター制御もUdonから扱えるようになれば、ゲームプレイやアニメーション表現の可能性がさらに広がると思います。
Log In