danidevy / fps_movement_rigidbody Goto Github PK
View Code? Open in Web Editor NEWA physics based movement system
License: MIT License
A physics based movement system
License: MIT License
Whenever I copy and paste Dani's code into my own script and add it to the player as instructed nothing happens??? (The Script doesn't do anything) am I doing something wrong? I think the issue might be how the way I'm copying his code but it doesn't show how to copy it in his tutorial.
please help me
I followed the tutorial and everything works just like in the video but I cant look up or down. :(
Assets\movement.cs(271,1: error Cs1056: Unexpected character 'c'
dont know what i did but that showed up and i dont know how to fix it im kinda dumb
:/
I continue to get errors stating "316,3, 316,14, Type or namespace definition, or end of file expected" and "316,8, 317,1, A namespace cannot directly contain members such as fields or methods" In my PlayerMovement Script. How would I fix that.
So, when I move, its really slidey, and if I don't lock the y position for the rigidbody, I go flying and thousands of errors pop up. help
The referenced script (NewBehaviourScript) on this Behaviour is missing!
The referenced script on this Behaviour (Game Object 'Player') is missing!
I copied and pasted the player movement code and those error messages came.
Can someone help me on this?
I used the same (everything) code from Dani and my player can double, triple, Multiple, jump.
My "Cube" isn't Attaching to the RotateGun script?
MacOs cant use the movement code.
set ur game up for webgl to load it up in chrome dat would be dop asf,
im a javascript programer, i made an fps game with physics etc raw code without using any engine in webgl
I'm getting an error with this code
//Iterate through every collision in a physics update
for (int i = 0; i < other.**contactCount**; i++)
{
Vector3 normal = other.contacts[i].normal;
//FLOOR
if (IsFloor(normal))
{
grounded = true;
cancellingGrounded = false;
normalVector = normal;
CancelInvoke("StopGrounded");
}
}
CS1061 'Collision' does not contain a definition for 'contactCount' and no extension method 'contactCount' accepting a first argument of type 'Collision' could be found (are you missing a using directive or an assembly reference?)
In the character movement script, all of the forces are added by multiplying by Time.deltaTime. Instead, Time.fixedDeltaTime should be used because the FixedUpdate method runs at a constant frequency unlike Update.
The current code makes the character accelerate much slower when you have high FPS, and much faster when you have high FPS.
Dani if you see this you may want to also fix it in your main game because it will give players with potato PC an advantage because they run at lower framerate.
Hello, i made my character a mesh with a rig and when i play it falls through the ground? How do i fix it and why does it occur
ok so whenever I make to many inputs, like pressing CTRL 10 times or something, the character just moves backwards and wont stop. i can walk forward by just... walking forward, but after pressing W he just continues to walk backwards...
he even does this sometimes when I press play and don't press anything. I have looked through the code but nothing seems to catch my eye, might be because this is my first project...
may someone spend their time with helping me? would be greatly appreciated
the code just doesn't work for my pc type, i'm using windows 10 and it says "There are inconsistent line endings in 'Assets/head.ms' script. Some are MAC OS X (UNIX) and some are Windows.
please help
AAAAAAAAAAAAAAAAAAAAAAAA im pressing jump on me keyboard but space just gives me the finger and doent work
WASD is inverted and same goes for mouse viewing
Can't jump
i can only move forward and backwards if i hold d or a with w or s
i cant download the code
idk what i did but its not working i cant move (im new to unity so it could be something basic)
Hey so my gun(cube) is resizing when I crouch, but in your tutorials it doesnt. ANY WAY I COULD FIX THAT?
i know how to move and everything but i can't jump or crouch
sorry I dont know how to delete an issue
D:
hipidiy hopidiy your code is now my property"
Pls help, the movement for the player works fine but i cant move the camera with the player..
Assets\Movement.cs(64,43): error CS1513: } expected i dont know what to do and i am watching the dani tutorial please help
The movement works fine its just when I go to turn the camera it does nothing. No movement. Please help.
so i used these scripts in my game, and made a few parkour levels, but when testing them i quickly realised you can jump when you are midair. i looked into the movement script and saw that there is a thing that blocks the jumping when midair, but it doesnt work (for me). anyone knows how to fix?
My version is 2019.4, ground doesnt come up as an optuin in what is ground, so i fall through everything.
the whole script in any Unity version (from 2018 to 2020) does not move the player.
The camera and movement work great, but the player doesn't turn with the camera. He stays facing the same direction. Any help would be appreciated.
This issue was mention by Dani I believe when he first premiered this movement system.
But for those who don't know, when you jump sometimes force is applied in what seems like a random direction.
The issue lies in the FindVelRelativeeToLook() method where Dani tries to find the direction the player is moving in with direction.
As most would, rb.velocity.magnitude was used. This included the jump force in the movement causing the countermovement
method to try and reduce it. Thus the random movement. This can be fixed by only including the x and z velocity.
Just text of the method that fixes this issue .
So i have a menu aswell everytime i press escape the mouse movement still moves so i cant press any buttons
so theres three buttons Resume Menu and quit i cant press any because the player mouse is moving when i move it to press the buttons please help
Line 102:
rb.AddForce(Vector3.down * Time.deltaTime * 10);
Time.deltaTime
is incorrect, and should be fixedDeltaTime
.
a couple days ago i started to notice that my player is getting randomly thrown around the playable area. I have been using the grappling gun script along side the player movement scrips. Randomly my player suddenly has multiple spring joint components attached to it. I would like to note that the only thing i changed before this was the model I was using for the gun but I did follow every step in order to have it all set up correctly
This script is not working at all. It says: The associated script can not be loaded. Please fix any compile erros and assign a valid script. Is there any fix to this? Or is the script simply just outdated? Please help! The MoveCamera doesn't work either with the same error message poping up. I'm new to coding so please use as much english as possible!
the controls are inverted, i spend 2 hours finding out how to resolve it but no idea, pls help.
When I Press The Mouse Button The Grappling Gun Works Fine But Sometimes When I Stop Pressing The Mouse Button The Spring Joint Attacked To The Player Don't Get Removed ):
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.