Comments (19)
Hello!
I'm not interely sure what you mean. Do you think you could send me a project where you can reproduce this or record the problem? That way I can get a much easier understanding of what's going on. :)
from gold-player.
Project is really big cause he has a lot of objects. Ok i will try to explain my problem. When i press jump button my player doesn't want to jump? This looks like it's blocking in invisible wall. Really weird.
from gold-player.
I can think of two possible reasons.
- The ground layer on the player (Movement - Other - Ground Layer) is not set up properly. Make sure to put the player on it's own layer and then NOT include that layer in the Ground Layer.
- The character controller height and center don't match. The character controller Y center must half of the character controller height. So for example, if the height is 2, the Y center needs to be 1. If the height is 1.8, the Y center needs to be 0.9. This is due to how the ground check and crouch checking work.
Let me know if this fixes your problem! If not, I would really like to see a screenshot of your player inspector so I can see if there are any anomalies. :)
from gold-player.
Only the first jump works well
from gold-player.
As I said, a screenshot of your inspector (with the movement tab selected) or a video of the problem would be greatly appreciated! It helps me a lot to see what the problem could be. :)
from gold-player.
Sure.
https://imgur.com/Hsjoapo
https://imgur.com/BAXglps
https://imgur.com/aEL7Ysk
from gold-player.
And player layer
https://imgur.com/XrO6Y2O
from gold-player.
Others settings are default
from gold-player.
In the first picture, I suspect that is the Ground Layer. You need to put every layer there you want to collide with EXCEPT for the player layer. So if your world is generally built up by objects with the Default, Floor, HitBox, etc layer, make sure to add those in the Ground Layer. But exclude the Character layer from that.
I hope that helps! :)
from gold-player.
I also discovered a bug with the crouching (see #24) that might be related to your problem with the player being in the ground when crouching. I'll make sure to fix that ASAP and then I can help you patch it until the next release, which will take a while!
from gold-player.
Sorry for the semi spam. Just wanted to let you know how to quickly patch the player controller in case you have problem with the crouching.
- Open the PlayerMovement script (Hertzole/Gold Player/Scripts/Core/Modules/PlayerMovement)
- Change line 256 from
m_CrouchCameraPosition = PlayerController.Camera.CameraHead.localPosition.y - m_CrouchHeight;
to
m_CrouchCameraPosition = PlayerController.Camera.CameraHead.localPosition.y - (CharacterController.height - m_CrouchHeight);
(Can also be seen here)
I hope things work out for you! If not, just ask away! :)
from gold-player.
Hi, thanks for help Hertzole! You're so helpful and i will add information about you in my project!
My problem was with rigidbody when "Use gravity" function was on.
But i have 2 others problem :/
Your script doesn't have a camera collider and that is problem for me :/
And secondly..how to add knockback functions when player got damage?
from gold-player.
Hello!
Gold Player unfortunately does not support rigidbodies, so some funky behaviour could occur with that. Glad you figured that out! :)
I'm not sure what you mean with camera collider. Could you elaborate?
Currently there's no support for knockback, but I could probably add that in the next release. I will look into it. Meanwhile, you could try to make a seperate script to apply knockback, like the example I found here. I hope that helps! :)
from gold-player.
Maybe script like 'rb.AddForce(target.transform.forward * Distance, ForceMode.Impulse);' will work with ur player movement script?
from gold-player.
Right now I doubt it will work. But I'll do my best to add a easy to use knockback system.
from gold-player.
Hi brother. I have one mistake and one sugestion. Bug with camera collision https://imgur.com/a/Ek2hJIl
And will be awesome if you add on this project Falling damage :)
Thanks a lot for good project!
from gold-player.
Hello!
For the camera collision problem, you need to change the near clipping planes on your camera, like this. I usually set it to 0.01. By default, it's 0.3, which can cause this issue.
For fall damage, that should already be possible to do in your own scripts using Gold Player. Here a brief summary of how you could do it:
In your scripts, like a health script, subscribe to the OnLand
event in GoldPlayerController.Movement
. If you aren't familiar with C# events, Unity has a good tutorial on it here. Then in your land callback, you can check if the fallHeight
is more than your threshold and do damage if the fall height is far enough.
I hope that helps! :)
from gold-player.
Thank you so much! You're the most helpful guy I've ever seen :-)
from gold-player.
Thank you! I try my best! :D
I will close this issue now as it seems like it's been resolved. If you have anything else you want to bring up, just comment again or open a new issue.
Remember to keep an eye out for new updates that will (hopefully!) include knockback and other fixes! :)
from gold-player.
Related Issues (20)
- AudioItem GUI does not work when outside player controller in 2019.1+ HOT 2
- Error when on any Unity Version earlier than 2019.3, and not using the new Input System. HOT 1
- Having problems using the new input system with mouse input. HOT 9
- Trying to use Gold Player with the old input system. HOT 3
- Can't set position through script HOT 2
- Provide examples HOT 2
- Unsure how to properly setup. HOT 3
- Gold Player movement is buggy on low time scales HOT 1
- Allow for camera based recoil/external forces being applied to the camera rotation HOT 3
- How can I embed the code in my project so I can modify the code my self HOT 2
- GetAxis returns wrong value in input system
- Can't get the player controller to even start without an error... HOT 4
- Cannot jump when up against any kind of wall collider... HOT 3
- Humanoid Rig HOT 1
- How to disable "Can look around"?
- How to hide a text, when mouse look doesn't placed on interactable object? HOT 1
- Is there any info/documentation on multiplayer integration? Since it's even mentioned to be 'easy' to setup. HOT 4
- Look angle animation not working HOT 2
- Head bob happens while player is not on ground
- Switching to using the new Input System Package HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gold-player.