Using Kinematic Character Controller with FC?

FlowCanvas Forums Support Using Kinematic Character Controller with FC?

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #2658
    elvisish
    Participant

    I understand this could be a question for the developer of KCC (I’ve tried!) but I’m having trouble understanding how to get Kinematic Character Controller working in FC. (https://assetstore.unity.com/packages/tools/physics/kinematic-character-controller-99131)

    The guide (https://docs.google.com/document/u/1/d/1sdWOHE6vJcsOLE2jxHLVs_Y170NT309C4DbPmmdmqAM/mobilebasic) suggests:
    <ul class=”lst-kix_av709k5wnfz1-0 start” style=”caret-color: #000000; color: #000000; font-family: -webkit-standard; -webkit-text-size-adjust: auto; list-style-type: none; padding: 0px; margin: 0px;”>
    <li style=”padding: 0px; font-size: 12pt; line-height: 1.15; margin: 0px 0px 0px 36pt; font-family: Arial; orphans: 2; widows: 2; text-align: left;”><span style=”vertical-align: baseline; font-size: 12pt;”>Add a KinematicCharacterMotor component (this will automatically create a readonly capsule collider)</span>
    <li style=”padding: 0px; font-size: 12pt; line-height: 1.15; margin: 0px 0px 0px 36pt; font-family: Arial; orphans: 2; widows: 2; text-align: left;”><span style=”vertical-align: baseline; font-size: 12pt;”>Create a script and call it “MyCharacterController”. Make it inherit from Monobehaviour and implement the ICharacterController interface</span>
    <li style=”padding: 0px; font-size: 12pt; line-height: 1.15; margin: 0px 0px 0px 36pt; font-family: Arial; orphans: 2; widows: 2; text-align: left;”><span style=”vertical-align: baseline; font-size: 12pt;”>Add a “public KinematicCharacterMotor Motor;” field to that class </span>
    <li style=”padding: 0px; font-size: 12pt; line-height: 1.15; margin: 0px 0px 0px 36pt; font-family: Arial; orphans: 2; widows: 2; text-align: left;”><span style=”vertical-align: baseline; font-size: 12pt;”>In the Start() of “MyCharacterController”, write “Motor.CharacterController = this” to assign it as the motor’s controller</span>

    I tried this, but got lost with the different interfaces and inheriting mono space. It’s a very popular asset but it seems setting it up requires some very strict method, is this possible?

    #2663
    Gavalakis
    Keymaster

    Hello there,

    May I ask what more specifically you want to control from within FC?
    Since Kinematic Character Controller requires a MonoBehaviour implementing the ICharacterController interface, this will need to be done with c#, since FlowCanvas does not create c# classes or can implement interfaces in such a way, but it can of course control existing code. As such and from my understanding of the asset, you can for example use FC to control the various methods/properties/events that the KinematicCharacterMotor component may have for example (drag and drop the component into an FC graph to list the various members). The basic setup described in regards to the interface implementation will still need to be done with a c# component however.

    Please let me know if that works for you.
    Thanks!

    Join us on Discord: https://discord.gg/97q2Rjh

    #2673
    elvisish
    Participant

    Thanks, I’ve been looking at the example controller, there’s some parts like:

    That’s inside ExampleCharacterController, so I’m assuming I’d need to remake this sort of controller with FC? Sorry for the questions about another asset, it’s just it’s probably the most popular replacement for CharacterController and I’m intrigued if it can be used in the same way.

    #2687
    Gavalakis
    Keymaster

    Hello again,
    No problem at all asking about another asset 🙂
    As far as I can tell, you will need to create a c# component (if no example is included) to implement the interface required since for example the velocity can only be set from within an interface method implementation (as far as I see). You can though however also create a public field in that same component and have FlowCanvas set that field. Then from within the interface method, you can set the velocity of the CharacterController to be equal to the previously set field (which you can set with FC). This might sound confusing, but does the asset have an example CharacterController you can share with me so that I can see what it does? Also, does dragging the said example character controller or any other component related to the asset into the FC graph editor, brings up anything useful methods/properties/fields that you can use directly?

    Let me know.
    Thanks! 🙂

    Join us on Discord: https://discord.gg/97q2Rjh

    #2781
    elvisish
    Participant

    Did you manage to take a look at integrating KCC with FC? The higher level scripting required to begin with using it might be possible to put in an FC extension that would take the difficult work out and enable the user to take advantage of manipulating the controller with regular graph work. It’s probably the most popular character controller on the asset store for kinematic physics, but it’s tough to use in FC without some higher level nodes that make the basic set-up simple.

    #2788
    Gavalakis
    Keymaster

    Hey,

    Unfortunately I wasn’t able o focus on any new integrations yet due to working on the new version as well as a new tool 🙂
    I will try to take a look at KCC more in depth after the new update is released. I can’t promise that an integration will happen though, until I see what can be done and how exactly KCC works.

    Thanks!

    Join us on Discord: https://discord.gg/97q2Rjh

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.