Quantcast
Channel: Questions in topic: "state machine"
Browsing all 42 articles
Browse latest View live

moving gameobject from state machine behaviour/different code result from...

Hello! I'm having trouble with a state machine behaviour, so far I have the following function: override public void OnStateExit(Animator animator, AnimatorStateInfo stateInfo, int layerIndex) {...

View Article



How to trigger state transition from C#

I have a list of transitions out of a state, and I would like to select one at random, but I don't know how to activate it from a statemachine behaviour. Given the potential number of child states, I...

View Article

Are those orphaned states in my animation controller file?

There appears to be orphanned States in our animation controller file that are not displayed anywere in mecanim. I found them when adding a debug.log output in the AWAKE section of a state machine...

View Article

How can I 'instantly' reset my state machine back to its first state to...

I'm working on a small puzzle game in Unity which is UI based. Most of the UI elements (screens/popups) that I use have a specific animation that will play when that element gets displayed on the...

View Article

Character states using Unity animation system and StateMachineBehaviour

I'm trying to use __Animator__ to control my character states. I've build a simple example where cube changes color depending on state ![][1] Behaviour code looks like this: `using UnityEngine; public...

View Article


What is the better way for let the game control the player from time to time

Good afternoon, On the game I am working on, there are moments where the player have to wait for a NPC to accomplish an action or, sometimes, the player doesn't have the control of his character (like...

View Article

What is the proper way to implement a 180 turn while running (Plant and turn)...

Hello, I'm kind of in bind here. We're entering a contest in the coming weeks and I still can't make our Plant And Turn (180 rotation while running) animation work properly. I'm hoping someone with...

View Article

What is the best method to animate and evaluate player body with animator?

I am using Unity's default animator for animating my character. I have navigation clips, idling clips, combat combo clips etc... I am providing transitions between clips with parameters, so if...

View Article


Alternative to Update

I'm trying to subtract health in a turn based battle system that I've been working on recently and whenever I would try and subtract player health in a specific enum/state in state machine (housed...

View Article


NullReferenceException while following Unity3d College tutorial @JasonWeimann

I have followed the following tutorial as the setup for my state machine https://unity3d.college/2017/05/26/unity3d-design-patterns-state-basic-state-machine/ there is a null reference exception but I...

View Article

ECS architecture & the state machine

I've recently been learning ECS and getting my head around DoD methodology, one question I have is around a State Machine replacement. ---------- Imagine I have a realtime hack 'n' slash with a series...

View Article

Multiple Conditional Animations for Single State

With full knowledge that what I am attempting can easily be done with a small script, I was curious if the Animator tool has built-in functionality to allow for a conditional animation for a state that...

View Article

low poly game kit pro

I dunno if anyone has used this but it's great. I got a character loaded in and he's moving and jumping and having a good time. Anyway I went to add a cape to my character and parented it to the main...

View Article


Why StateMachineBehaviour not calling OnStateExit when doing...

I made StateMachineBehaviour which is taking off certain restrictions from my character when StateExits but OnStateExit is not called when I change animation by doing animator.Crossfade. Why?...

View Article

FSM State implementation — SO, SO+wrappers, custom classes?

I've been wracking my head about this for a couple weeks, so maybe, just maybe, someone could chime in and point me towards the right direction. My FSM design was initially based on Scriptable Objects...

View Article


Trying to understand the State Pattern - having trouble implementing

Hi all, Sorry ahead of time for the formatting, I can't for the life of me get the spacing to work. Anyways, I'm self taught and looking to understand the State pattern by implementing it into the...

View Article

State Machine Behaviour OnStateEnter Check previous state?

Hey, I want call OnStateEnter on a state but only if it transitioned from a specific state and not from all the states connected to it, how can this be done? I just want to call a function if a...

View Article


Varying behaviour of transform.position.localPosition.x in...

So I'm getting the basics of a platformer going, and doing the work early for animations and actions. I have two animations, DevRollRight and DevAttack, with two StateMachineBehaviours attached to...

View Article

Twiching Velocity using RigidBody.addForce.

I am having a problem that when the Enemy try to move to the Player the velocity kept changing, The code: Vector3 direction = player.transform.position - transform.position; direction = direction...

View Article

How can I switch between prefab variants in runtime.

How can I switch between prefab variants in runtime. I don't want to instantiate variants, I just want to have a reference of each variant and change it like a state. I should be an option I could not...

View Article
Browsing all 42 articles
Browse latest View live




Latest Images