Quantcast
Channel: Questions in topic: "state machine"
Browsing latest articles
Browse All 42 View Live

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


Anim B, Anim C -> Anim B" or "Any State -> Anim B" would there be a difference?">"Anim A -> Anim B, Anim C -> Anim B" or "Any State -> Anim B" would there be...

So i have two options on how to go to animation states on animation controller. Would like to know which one is better. Thanks.

View Article


StateMachineBehaviour get component on awake ??

public class StateCheck : StateMachineBehaviour { Animator anim; private void Awake() { // anim = with this animator } } i need to get animator on awake, how can i do that ??

View Article

Can I use Bolt to make some StateMachies and use them in another C# scripts?

I tried to write if and else to build a statemachine script component. And I find that I will have to write so many conditions, because the Player has so many states: Idle, Run, Jump, Attack... And...

View Article

Animation Event in state machine state

I have a simple Finite State Machine which i use, along with states, to control my enemy characters who currently have working states for Idle, Hunting and Attack (based on this tutorial:...

View Article

Question regarding FSM, are multiple Machines on the same Object recommended?

Hi, I'm about to tackle the FSM for my game but thinking about what states I need I came to the conclusion that I would need 2 separate StateMachines. So I have 4 Movement-States and 4 "Action" states....

View Article


Need help with player movement,Help with character controller

Hi I'm in the early stages of working on a game and I am having some problems getting my player movements to work properly, so I thought I might try my luck and see if anybody in here would be able to...

View Article

The Quantum Animator? - Animator behaving differently when animation...

I'm making a 2.5D brawler game and I'm using root motion and assets from the unity asset store. I've been having a hard time using the custom state machine that came with the animations, but I was...

View Article


Player velocity becomes 0 for 1 frame during State Machine transition

Hello! I am currently making a game with a character that can run sideways and jump (for now), and I've already ran into a peculiar issue that I am not sure how to fix. I am using a class-based State...

View Article

not showing onPreviewGUI in StateMachineBehaviour Editor

i have a Editor script: public class c1 : StateMachineBehaviour { } and editor: [CustomEditor(typeof(c1))] public class c1_Editor : Editor { public override bool HasPreviewGUI() { return true; } } If...

View Article


Identifying a transition to self in StateMachineBehaviour

Hello, ---------- I have a class that extends [StateMachineBehaviour][1] attached to some of my Animator states. These states have transitions with "transition to self" enabled. After some testing, it...

View Article

Trouble with a State Machine for Turret

Hi! So I want to preface this that I have not worked in Unity for very long and have minimal coding experience in general. A lot of the code that I have is a combination of stuff I have learned from...

View Article

Checking current Animator Controller states gives unexpected result

We are trying to set up an animation system where we can "compose" character animations based on body part animations. We have an animator component with multiple layers, one for each extremity, where...

View Article

How to apply Animator to different game objects (when animations affect...

Is there a way to drill down from `Animator` to the game objects that get animated within each state? In my case I have a keypad of identical buttons. As you see below each number pad has PadCircle and...

View Article


State Machine Tutorial Question

Hello, I am pretty inexperienced with coding but I am trying to create a simple state machine. I followed a step-by-step youtube tutorial, but I am having issues. When I run the scene, I asked the...

View Article


State Machine Question

Hello, I am pretty inexperienced with coding but I am trying to create a simple state machine. I followed a step-by-step youtube tutorial, but I am having issues. When I run the scene, I asked the...

View Article

how to make multiple transition from one state?

I cant make multiple transitions from one state, like from jumping to idle, and from jumping to walk, when i do one of them, the option "make transtition" dissapears

View Article

State Machine: Cannot switch states on second state enter

I have the following code in my grounded state, which works perfect on its first enter, it can be switched to any other state I want, but after entering in the grounded state for the second time, the...

View Article


Movement smoothing stopped working.

**Context**: I'm in the very early stage of making a simple local 3D fighting game. I used the movement code from [Brackey's Third Person Movement tutorial][1] and it worked fine. I implemented a...

View Article

Finite State Machine

Hi! I am still fairly new to programming in unity and I have now come upon something that is a little perplexing to me. I have a finite state machine with 4 scripts: a state machine manager deriving...

View Article

What is the best way to implement user input and movement when using a State...

Hello. I am trying to implement a state machine for my player. So far I've implemented two states, 'Move' and 'Idle', but I am planning on expanding it later. The movement system is as follows: when...

View Article

How to activate a trigger in state machine when object reaches position?

So I'm currently trying to make a boss fight for my Graidus shmup like game. So far I have made the script for making the boss come onto screen. Currently there is an Object in the game called Spot,...

View Article



Set state behaviour order

I'm creating state machine behaviour script. ![alt...

View Article
Browsing latest articles
Browse All 42 View Live




Latest Images