Skip to main content

103. Unity3d Tutorial - Advanced Movement FSM

See video

We continue with another tutorial in our Hack And Slash demo made with the Unity3d Game Engine.

In this tutorial, we will set our AdvancedMovement script up to be a basic Finite State Machine (FSM).

Tags:

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Offline
Joined: Mar 4 2011

I've checked the code many times over and can't figure out why the character is not moving forward. It will turn and strafe, and messages are being sent to MoveMeForward as it runs when I press my "Vertical" button, but no forward movement.

Used to have an error for best fit for "RotateMe and "Strafe" but I had a similar AdvanceMovement script attached to the character. It has since been removed and there are no errors. Just doesn't go forward. _movedirection looks right and I have the latest version of Unity.

Offline
Joined: Aug 15 2011

Mine won't do any actions now.

Edit:

Nvm, i found my issue in the

private void Init(){
if(!GetComponent())return;
if(!GetComponent())return;

_state = AdvancedMovement.State.SetUp;
}

I initially didn't have it set to "!GetComponent...". It was just set to "GetComponent...". that "!" makes all the difference. He didn't verbaly say in the tut that it was supposed to be a !GetComponenet, so it took som hard looking to find it. Check and see if this is your issue too.

Offline
Joined: Jul 7 2011

I check again and again my script but i can not found it why my character is jump twice can help anyone and tell me what "loop" is false plz??? thnx :)

Offline
Joined: Aug 15 2011

I'm having the exact same problem. Everytime I jump, the character automatically jumps again when he hits the ground. It's more of a bouncing action, but it's not the way it's supposed to work. I've tried changing settins with the fall timers and jump height and such but so far no luck.

Any Help would be much appreciated.

Petey's picture
Online
Joined: Feb 3 2010

We fix this later on.

Offline
Joined: Aug 15 2011

Ah, excellent. Good to know. Thanks =)

Also, do we ever get around to fixing the camera? (unless i missed something somewhere... lol) It's still resetting it's default looking direction based on global rotation rather than the player. So when I click the right mouse button, it automatically defaults back to it's origional rotation position.

Oh, and thanks so much for these tutorials. It's been a huge help in my understanding of Development as a whole; which is good considereing Game Design is my major in school right now. Here's hoping I can work for BioWare, or have my own development company, some day... rofl.

Offline
Joined: Oct 2 2011

It was working good on tutorial 103. but when I added this 104 tutorial it dont work anymore,my character only jumps but it dont move anywhere :S?

it dont give me any errors so I dont know what to look,any idea anyone?