Giter VIP home page Giter VIP logo

expressobits / character-controller Goto Github PK

View Code? Open in Web Editor NEW
281.0 10.0 11.0 1.76 MB

Modular Character Controller for Godot 4. Includes FPS version with headbob and camera movement. (Walk, Crouch, Sprint, Swim and Fly Mode).

Home Page: https://godotengine.org/asset-library/asset/1567

License: MIT License

GDScript 100.00%
addon charactercontroller gdscript godot godot4 godotengine

character-controller's People

Contributors

epergo avatar gmcfromhell avatar imcpcn avatar scriptsengineer avatar swolford avatar whimfoome avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

character-controller's Issues

Jittering when moving and rotating at high FPS ?

Hello,

I just started experimenting with this controller. One thing I noticed is that objects in my scene "jitter" when I move around them while rotating the mouse to try to keep them in focus. Simply moving or simply rotating doesn't cause this problem, only when trying to do both at the same time.

The problem is only visible at high FPS (more than 60), and the higher the more jitter I see.

I tried taking a video of the problem and I do have one here : https://github.com/expressobits/character-controller/assets/4077266/dce346ff-27e8-4b21-8c5f-cbb45e62aabc

But... be warned that the problem is only visible on the video when you have a screen refresh rate higher than 60 (and the higher the jittering).

I'm not sure I understand the dynamics behind this problem so I would appreciate an explaination if someone understands what's happening.

I could of course limit FPS to 60 but I'd like to let players chose more if they wish.

Crouch

the main page has crouch 2 times in the list

Not working on Godot 4.1 c#

I cannot get the plugin to work on godot 4.1 c#. Tried all the suggested fixes on Godot forum
like renaming the scripts to lowerCase, build, reload. Set Language back to C#.. The addons folder is also lowerCase. The unidot plugin is working fine so could there still be an issue with the plugin?

Provide a way to reset the player

Please provide a way to reset the player, i.e. to set a provided position and look vector, cancel all abilities, and cancel all momentum.

Use cases:

  • Teleporting the player around the map
  • Changing the environment around the player
  • Returning from a pause/menu screen

While this can be accomplished by unloading and loading the player scene, doing so is overkill and may have further-reaching impacts. For example, I have all kinds of menu screens and overlays tied to the player scene node (that's where the camera is, after all...) that are connected with all kinds of exports and signals to the game logic:

image

Intended way to expand the controller?

So not sure if this is more "Godot" related or addonrelated. Might need to RTFM :P.

How would one go about adding their own inputs to this (For example, left click to shoot)

So in a previous issue it was found you can import and use the Player scene, which handles various input mappings.

I can see that it is possible to extend a particular script within Godot.

Should you be extending the Player scene/script or instead, writing your own Player and then extending the FPSController?

I would imagine it's the latter as if you attempt to write

func _physics_process(delta):
    #Your code here
    pass

Then this will just overwrite everything in the existing player.gd provided by this addon.

Documentation Reference API

Reference API

  • CharacterController3D
  • MovementAbility3D
  • FPSCharacterController3D
  • HeadMovement3D
  • WalkAbility3D
  • SprintAbility3D
  • CrouchAbility3D
  • JumpAbility3D
  • FlyAbility3D
  • SwimAbility3D
  • HeadBob
  • TimedBobCurve
  • PlayerAudios
  • AudioInteract
  • Player
  • Level

Tutorial

Is there a step by step tutorial on how to use it? In Examples it says "the Player scene" as if I should know what it is.

I downloaded, instantiated a CharacterController and then... what?

New to Godot so maybe a little bit stupid.

Thanks

Missing setting mouse capture as default in player.gd

Very cool script. I'm a complete noobie at Godot. Sorry if this should be apparent.

I am able to open the level.tscn, map controls, and move around.

The problem arises when trying to add the character controller to my own project.

I've tried a few things in an attempt to replicate the example but none of them seem to work.

  1. Just copying over player.tscn from the example to my own world.
  2. Creating an inherited scene of fps/fps_controller3d.tscn, saving it as player, importing that into my own world, and copying the script attached to player.tscn to my own player scene.

A bit stumped.

Tutorials in Wiki

  • Extend the character controller
  • Create new movement AbilityMovement3D
  • Add addon to your scene

Broken in Beta 16

With all of the compatibility changes in beta 16, a lot seems to have broken with the character controller. I created a new project, imported the addon, enabled it, set the level scene as the main scene, and then ran it and got this:
image

In another existing project where I previously installed the addon and had it working, I get these "Parser Error: Argument 1 of annotation "@export_node_path" isn't a constant expression." errors everywhere there's an "@export_node_path".
image

Edit: The issue with the "@export_node_paths" is that quotes are now required on the annotations. See this PR for more info on the change.

Wasn't able to find which change in beta 16 is causing all of these errors, but hopefully there's an easy fix.

Disable input on multiplayer game

Hi there,
I'm developing a multiplayer game.

I only want the character-controller to be controllable when the current instance is the authority. To achieve this, I'd like a simple switch to enable and disable input across the entire node.

Thanks

Allow Contributors to modify (or ask to modify) documentation.

Currently there is no way for a third party contributor to provide updates to the documentation.

User Story:

  1. I am a library user who just learned something on my own or with the help of the maintainers
  2. I would like to provide updates to the documentation to help others.
  3. I make an update to the documentation to inform library users of this information.

What the maintainers might want:

  1. A maintainer would like contributors to provide updates to documentation.
  2. A maintainer would like to review contributions to documentation before allowing them to go live.
  3. A maintainer would like this process to be as seamless and pain free as possible.

There are multiple ways this could be handled but I'm uncertain if Github Wiki will allow the needed permissions for a suitable strategy.

As an example see the following issue.

A look at the GH Wiki documentation seems to demonstrate that it can be only certain people or all people who can make modifications. This may or may not be desirable.

Suggested Action:

  1. Implement a wiki or documentation system that can be modified via the standard PR workflow. The documentation is created and updated via code.
  2. Implement a basic CI pipeline to update the documentation.

Update CharacterController3D for modularity

The current CharacterController3D requires constant updating when adding new features. This proposal proposes to update the behavior in favor of a more dynamic approach.


Signals

Instead of individually creating new signals for each ability inside of the CharacterController3D class, either create them dynamically using the native add_user_signal function, or declare them inside the ability and make the CharacterController3D connect to them dynamically.

Properties

Properties should be ability-bound, thus visible from the editor under the abilities_path array, when selecting the ability. This would however require the abilities to be resources, potentially making this a major undertaking.

Emitters

Emitting signals should be done from within abilities and not on the CharacterController3D.

TL;DR

Each ability should only take care of themselves, independently (or co-dependent of another's ability by connecting to it directly) of others. This allows more complex behavior and abilities being more than just movement related. (ie. interaction handling, etc.)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.