At the moment I am playing around with the animation system (to finally understand it ;-)).
I used Animancer and Mecanim Animations and I would like to use one of this systems.
The only problem is: I can only get the default anim to work (triggers by the animator controller I guess). All other animations (just used a few trigger ones like walk, idle and run) won't be fired. The character will move (with idle animations playing)
I used this
https://orkframework.com/ork-2/tutorial/gameplay/mecanim-animations description.
Any idea or hint what I am doing wrong?
- I moved the animations auf out the fbx to be sure its not the problem
- I created a simple animator controller (idle, run, walk)
- No parameters or transitions are set up for now
- Idle is the default state/animation (works)
- the correct player prefab is spawned (with controller, animator on parent object)
- Animation & Movement is set to "Default Mecanim" and the animations are setup (idle, run, walk) and set like in the description
- autoanimation is turned on
- move speed is disabled
- horizontal/vertical move is set
You could try following a certain section of Keldryn's tutorial. Just scroll down to 4. ORK Setup and follow only that part. For State Name, since you aren't using sub-state machines, just use the exact name you used for your Idle/Walk/Run states in the Animator.
The problem or difference seems to be, that I use the prebuild animator controller from Explosive (its quite comprehensive). So I have different parameters which have to be sent into the controller.
So I guess:
option 1: edit the ORK3 setup "Animations - Mecanim - Animation" to pass the parameters into the animator controller. And maybe disabling auto parameters (not sure what they are for)
option 2: build my own controller as described in the tutorial.
I'll try option 1 for now. Hopefully the parameter setup is as straight forward as it looks.
For root motion, use the Button player controls with root motion setup (e.g. as it's used in the 3D Action RPG tutorials). Or any custom control that handles that for you (e.g. if something for that came with your animations).
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
- VelocityX / VelocityZ does not work
- Velocity X / Velocity Z does not either
Where and how would I configure this in ORK? I'd like to send an command like in the following code example to trigger an animation.
Code Example:
// Check if can start Attack Action.
if (!rpgCharacterController.CanStartAction(HandlerTypes.Attack)) { return; }
// Left weapon.
if (rpgCharacterController.hasLeftWeapon
|| (rpgCharacterController.leftWeapon == Weapon.Unarmed && rpgCharacterController.rightWeapon == Weapon.Unarmed)) {
if (GUI.Button(new Rect(25, 85, 100, 30), "Attack L"))
{ rpgCharacterController.StartAction(HandlerTypes.Attack, new AttackContext("Attack", Side.Left)); }
}
// Right weapon.
if (rpgCharacterController.hasRightWeapon
|| (rpgCharacterController.rightWeapon == Weapon.Unarmed && rpgCharacterController.leftWeapon == Weapon.Unarmed)) {
if (GUI.Button(new Rect(130, 85, 100, 30), "Attack R"))
{ rpgCharacterController.StartAction(HandlerTypes.Attack, new AttackContext("Attack", Side.Right)); }
}
// Two-handed weapon.
if (rpgCharacterController.hasTwoHandedWeapon) {
if (GUI.Button(new Rect(130, 85, 100, 30), "Attack"))
{ rpgCharacterController.StartAction(HandlerTypes.Attack, new AttackContext("Attack", Side.None)); }
}
You might need a wrapper script between ORK and the animation system if there are no functions that can be called from ORK that way.
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
But it seems that I messed up something in my configuration. Something that is not needed (yet) at this point.
It's the same behaviour as with the Explosive controller:
- The animations are playing correctly now
- But the player is stuck at the place
The 3D action RPG uses root motion for the actual movement, i.e. the movement comes from the animations. Make sure your combatant's Animator component is set up for that (and your animations use them).
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
I am doing the 3D Action-RPG Tutorial but try to bring in my own assets (Synty Modular Character and Explosive Animations).
The Animator is now setup for this (copied from Action Tutorial and replaced the Animations). And the prefab now uses the correct animator controller. Because of this, the default animation switched now to "walking". But still stuck.
I compared the tutorial (multiple times) with my setup and found one difference (Control Behaviour, which I deleted).
So it must be a different option to look for?
Edit 2: Found it. The spelling for my "Forward Speed Parameter" did not match the one in my animator controller.
Thanks for your help (I guess I have to send a beer over)!
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
I copied the finished ActionRPG (only the ORK folder without assets) as a template and replacing with my own prefabs and animations now. This works quite well, my Chomper is a Spider now (I am here: https://orkframework.com/guide/tutorials/3d-action-rpg/05-enemy-chomper/). The spider patrols and makes sounds and plays the idle animation.
But it will only play the default animation (idle) and not the walking (and I guess the attack animation either). So it seems, that the animations aren't triggered correctly.
At first I configured the spider animations manually (Base/Control>Animations>Spider) and set these animations for the spider combatant (Combatants>Combatants>Spider>Animations&Movements>Animations). This already worked for the Ellen/Player Combatant.
The second time I generated the the spider animation setup from the controller (the setup is different from my manual one).
But the spider won't play the walk animation and I have no idea why. I guess it has something todo with the animator controller.
Could you give me a hint what I am doing wrong? It should work?
If you're enjoying my products, updates and support, please consider supporting me on patreon.com!