[Released] Kinematic Character Controller

Rotation Inquiry →

problem solved.

                currentRotation = Quaternion.LookRotation(AssignedCharacterController.WorldspaceCharacterPlaneMoveInputVector);

figuring it out little by little :wink:

now I just have an issue where when I let go of the joystick his rotation resets :stuck_out_tongue:

Is there a way to get the diff of the changes to the KinematicMotor or other classes?

Maybe git access or something? I made some changes for my game and I’d like to see the fixes/updates/changes directly so I can apply them to my own version.

It would be possible to use this: https://www.diffnow.com/
and just compare the vanilla version from the previous update with the next

The changes I’ve made so far in KinematicCharacterMotor are very simple (changed some private’s for public’s, added SetPosition/Rotation methods, etc…), so I don’t think the upgrade would be a lot of work

Ah, I never noticed that I forgot to add rotation to the NoClip mode! But yeah, it’s really just that there was nothing that told it to rotate

any ideas on what I could do to prevent it from snapping back?

Right now you’re making it rotate towards its move input vector. When you let go, that vector will be zero, and that’s why the reset happens. To solve this, only modify rotation if the move input vector isn’t zero

Got it! thank you!

Hey.
Just bought it now and ran the example scene. It was very stuttery. I had to turn off Auto Sync Transforms and set my fixed timestep to 0.001. Smooth as butter after that.
You might want to add a warning to Unity 2017 users to do this otherwise some might get a bad first impression. So far so good. :wink:

I will definitely check this out. Normally, things should be working smoothly with or without autoSync, and with any fixedTimeStep (even if it’s 1 second), but I wonder if the last update broke this. What version of unity are you using?

@Rademanc
ok so I’m back from doing tests in 2017.2f3 and 2017.3b10, with a fixed timestep of 0.02, and with autoSyncTransforms on and off.

And I haven’t been able to reproduce the issue yet. We might have to dig a little deeper to find out what’s going on, so here’s a few questions:

  • Did you import the package into an existing project? If so, do you still have the problem is you try importing it in a completely new/empty project?
  • Which OS are you running the Editor on? (Win/Mac/Linux)
  • What is the “target platform” that is currently set for your builds
  • Which specific version of Unity are you using?
  • Do you think the stuttering might look like this issue , or is it more obvious than that?

@PhilSA
1: It was a new project.
2. Windows 10
3. Whatever the default is.
4. 2017.2.0b2
5. Yes it does look like the same issue.

I ran it with 2017.2.0f3 with auto sync on and a timestep of 0.2 without any issues.

Thanks for the support :slight_smile:

I am really happy with the controller.
The reference implementation is quite good enough for what I have in mind too. :wink:

Any chance this works with Unity 5.6?

The short answer is no,

This package makes good use of Physics.ComputePenetration(), which was introduced in 5.6, but was buggy. It was later fixed in 2017.1, which is why that version is the minimum requirement.

However, it’s possible that it would work just fine with the latest 5.6 patch. I’ll make some tests tonight and report back

1 Like

@Discord
Just tried it with Unity 5.6.3p4, and it works fine. I’m assuming the patch releases after that one will be fine too.

The only thing to note is that one of the “Walkthrough” example scenes uses the Playables API for something that’s unrelated to the character controller (I used it for moving a platform with an animation clip). It’ll give you an error since it was introduced in 2017.1. Simply commenting out the code will fix this

Awesome, thanks!

Hi- Just curious about this character controller pack.
Does this allow forward, backward, and side movement while you are in the air? I’m currently using the built in Unity 3rd person character controller and it doesn’t allow this. I know I can modify it but I’d rather use a prebuilt package like this if possible. Thanks!

It does allow this. Here’s an example with exaggerated air speed values:
https://i.gyazo.com/e07b658a286bd3004ceb538fde2386c8.mp4

You can also do that a little bit in the WebGL demo, but it’s less noticeable

1 Like

So cool! I also just realized I had another question: Is there swimming (underwater) type controls you can configure as well? I’ve seen other underwater controllers on the app store but none so far as nice as yours

There is an example for writing a swimming state, along with a tutorial that takes you through all the steps required to code this.

It is pretty robust in terms of reliability and smoothness, but I’m not sure if it has enough features to really be used in most games without adding anything to it in code. Here’s what it looks like:
https://i.gyazo.com/53d12ccf02ec91aa2ec9eea075984078.mp4

1 Like

Hey so I downloaded and imported the assets into my project and tried to run the example playground but I am getting a ton of errors. Mostly stuff like "OrbitCamera does not contain a definition for ‘SetFollowTransform’ and no extension method 'setFollowTransform of type OrbitCamera could not be found. "