playMaker

Author Topic: 3rd Person Character Movement  (Read 33463 times)

Elizeusz

  • Playmaker Newbie
  • *
  • Posts: 32
Re: 3rd Person Character Movement
« Reply #15 on: April 18, 2012, 01:41:37 PM »
Hi thank for your explanation they are very god. This is what i have done i will post screen this on one FSM but is working i will try now follow your another explanation with global transitons :)

I have another question. Now everything is working :) but what i can do if my capsule ( character controler ) is not jumping with my character? What i have to add ? I saw that you use character motor is this what i need? If yes where i can find this ?


justifun

  • 1.2 Beta
  • Sr. Member
  • *
  • Posts: 280
Re: 3rd Person Character Movement
« Reply #16 on: April 18, 2012, 02:20:06 PM »
Character motor is going to be automatically get added when you add a character controller or platform input controller to your capsule.  They are found in the standard unity menu in Component - > character controllers (if my memory serves correct - not at my computer at the moment)

Elizeusz

  • Playmaker Newbie
  • *
  • Posts: 32
Re: 3rd Person Character Movement
« Reply #17 on: April 18, 2012, 02:32:57 PM »
Componets - physics - character controler but not character motor . Maybe i need to add some standard ssets.
Anyway after adding this one my capsule will jump with my character ? Because now my animations is working and character is mowing up but capsule is still on the ground :D

Elizeusz

  • Playmaker Newbie
  • *
  • Posts: 32
Re: 3rd Person Character Movement
« Reply #18 on: April 18, 2012, 02:37:56 PM »
Maybe this question was ask before but if you know can you tell me what i can do to update all this sctions for example i see that there was update on get axis vector and i do not know what i have to do. I bought playmeker and i have one file playmeker 1.3.2. What i need to do ? Is there way to download this fixed actions ?

justifun

  • 1.2 Beta
  • Sr. Member
  • *
  • Posts: 280
Re: 3rd Person Character Movement
« Reply #19 on: April 18, 2012, 02:47:39 PM »
Each action update is included with each iteration of playmaker when its released.

But i not sure if its included in the one you are using (i'm using the latest beta version)

The post about it being updated is here
http://hutonggames.com/playmakerforum/index.php?topic=1302.0

but alex didn't include the updated action with the post.  Usually you can download the specific action and simply overwrite the one in your "actions" folder in the playmaker folder in your scene hierarchy.


Elizeusz

  • Playmaker Newbie
  • *
  • Posts: 32
Re: 3rd Person Character Movement
« Reply #20 on: April 18, 2012, 03:02:20 PM »
Thank you :)

justifun

  • 1.2 Beta
  • Sr. Member
  • *
  • Posts: 280
Re: 3rd Person Character Movement
« Reply #21 on: April 18, 2012, 03:33:24 PM »
Over the next week or so i will put together a full blown tutorial for setting up a third person controller system with a source project file etc and accompanying video.

Elizeusz

  • Playmaker Newbie
  • *
  • Posts: 32
Re: 3rd Person Character Movement
« Reply #22 on: April 19, 2012, 12:52:51 AM »
Great ! :)

terrymorgan

  • Junior Playmaker
  • **
  • Posts: 65
Re: 3rd Person Character Movement
« Reply #23 on: April 22, 2012, 08:54:37 AM »
Apparently, the Unity file is not useful, here's the unitypackage-

http://terrymorgan.net/3rd_person_justifun.unitypackage
11.3K

Deadlyapples666

  • Playmaker Newbie
  • *
  • Posts: 10
Re: 3rd Person Character Movement
« Reply #24 on: April 22, 2012, 10:14:18 AM »
this tutorial is very useful however.

I have set my own up following a mixture of the tutorials.

My character can strafe left to right and move forwards and backwards and ive added the camera to the sphere as a child and made the mouse rotate the character and as the character rotates so does the camera..

Problems

1. The Capsule rotates up and down when I look up and down :P. Like a rocking egg or something hehe.
2. I cannot jump.. Atleast not as I would hope the jumping to work.. Or would jumping be more related to the animations when I get them in.

Maybe a little details as to what I am trying to achieve :D

I am looking for a camera setup similar to the Witcher 2 or Like World Of Warcraft... but with the Right mouse button held down.. Its like a 1st Person camera functionality but from a 3rd person perspective.

Maybe look at the game Tera. The MMO from Japan. Thats the sort of thing I am aiming for. I am getting together a prototype for an RPG I've written up :)

justifun

  • 1.2 Beta
  • Sr. Member
  • *
  • Posts: 280
Re: 3rd Person Character Movement
« Reply #25 on: April 22, 2012, 10:27:30 AM »
In order to make the capsule not rotate back and forth as you explained, there's 2 ways to accomplish this.

Depending on if you used a rigid body on the capsule or not....
If you did, then check the box labelled "Free rotation X and Z" in the component tab , this will lock its rotation around its Y value (left and right).

If you arn't using a rigid body, then you need to separate out your axis inputs to do 2 different things.

You only want to use the horizontal input for turning your character left and right, so this should only feed into the Y rotation value of the capsule.  

The up and down vertical axis should only rotate your camera that's parented to your character, not the capsule itself.  This will prevent it from rocking back and forth.

You need to have the get axis event in 2 separate locations for different axises. (one on the camera and on the capsule)



There's 2 different ways you can approach jumping.  One is to simply make the animation of your character jumping into the air and leave the capsule on the ground.  This is only handy if you are not using physics at all, and most likely your game takes place on a flat surface. It will appear as if he's jumping but won't be adhering to any of the physics components of unity such as gravity or collisions.

The second involves adding a platform input controller and a character controller component onto your capsule and using the jump provided by unity.

When animating a jump for this method, you need to remove all Y value animation keys before exporting your animation (this will result if your character looking like he's jumping in place).  The up and down translation will come from the physics jumping.  And hopefully will line up with your jumping in place animation to look visually the way you want it to.  It will take some tweaking in both your animation and the character motor values on your capsule.

Elizeusz

  • Playmaker Newbie
  • *
  • Posts: 32
Re: 3rd Person Character Movement
« Reply #26 on: April 23, 2012, 08:42:46 AM »
Can You explain me where is platform input controler ? I see character controler but not the other one ... Thanks for secon jump explanation i will use it for sure but i need to know where is platform input controler.

justifun

  • 1.2 Beta
  • Sr. Member
  • *
  • Posts: 280
Re: 3rd Person Character Movement
« Reply #27 on: April 23, 2012, 10:52:00 AM »
Its part of unity's standard assets (character controllers)

Import "character controllers"

Then you can find it in the component menu.


Elizeusz

  • Playmaker Newbie
  • *
  • Posts: 32
Re: 3rd Person Character Movement
« Reply #28 on: April 23, 2012, 01:59:09 PM »
I found it :D but after i put it to my capsule and hit play to see waht will hapen i see this error :

NullReferenceException
PlatformInputController.Update () (at Assets/Standard Assets/Character Controllers/Sources/Scripts/PlatformInputController.js:35)

Anyway i see that this script is workin because when i change gravity and speed i see update but i still do not know how to move this capsulle up :D Now when i hit ctrl whiich before i setup for jumping my capsule is still on the ground. I need to use some force on Y ?

leo_silvas

  • Playmaker Newbie
  • *
  • Posts: 5
Re: 3rd Person Character Movement
« Reply #29 on: August 03, 2012, 01:10:05 AM »
Justifun, great video tutorial!

Could you post the project that showed the video please? For days I'm trying to understand the system conditions to compare float would help me a lot!