First-Person Controller for Unity Part 2 - FPS Move and Jump C# | Bolt(Visual Scripting) Parallel
Вставка
- Опубліковано 4 жов 2024
- Add Move and Jump to player controls of your Unity game.
New Input System: • How to Use New Unity I...
Part 1: • Unity First-Person Con...
Support us: / smartpenguins
Discord: / discord
#Unity #CSharp #Bolt #gamedev #tutorials #nocode
Music: www.orchestral... "Fantasy Adventure", "Sugar Fairies", "Eternal Story"
You're so underrated, mate!!! Keep it up
If anybody wants to know how to get smooth movement (as in the Player accelerates and decelerates), use Vector3 Clamp Magnitude instead of Normalize. Then just set the max magnitude to 1. Otherwise the Player movement will be very jittery and there will be some lag when you stop moving.
Thanks you so much, my player would keep moving for a moment and that is one of the only issues I have left to fix for my game
yea it worked thanx
This works beautifully. Thank you
But is there any way to make it so the player immediately stops moving when you stop making him move
LIFE SAVER THANK YOU SO MUCH 😭😭😭
After watching all tutorials for visual scripting and turn myself crazy to it, i finally made it thanks to you.
Awesome work, subscribed, huge BIG UP !
I dont comment on videos at all but man these tutorials are exceptional. Thank you for making them. Really.
I will finally take steps towards my dream of developing games!
Glad you like them! Good Luck!
You're so underrated, mate!!! Keep it up
Really enjoying these. Learning quite a bit on the UVS side and it makes reading C# lines much more understandable. Thank you for this!
full bolt course for complete beginners? You have a great flow and i love you.
these videos are really helpful and doing both the visual scripting and c# scripting really helps in understanding, ima sub rn.
Very easy way to do the same thing. I watched other videos as well tried to make is work properly. But everything was very complex and not working very well. Then I specially seached smart penguin and scroll down to this video as I am previous subscribers. And finally got it working in 2:49 am. Thanks for such easy tutorials. I am here mainly for bolt tutorials. I watch C# but replicate it in bolt. So Bolt is the main reason I am here.. Bolt is your USP (atleast for me).
I am just trying out the Bolt and I love it how easy can be it for Artists, your video helps a lot to understand how the Bolt Works
god I wish I could program c# and do bolt at the same time. very nice tutorial !
it didnt seem to work, is it because of how i cant edit the velocity in the inspector (or its gray?)
A question...why is the velocity in the update and not in the fixed update? I am learning but have been learning that anything with rigidbody should be in fixed update to be the same on every computer...otherwise the velocity will be different depending on framerate? or have I got it all wrong?
Dude, thank you. You are my new hero.
Will save for later i tried to search on google for the move in direction pointing, but no results. Searched First person controller and found this helpful tutorial, thanks for helping!
Bro the quaternion is not multiplying with vector3 in my case it shows error. I tried changing the multiplier from generic to vector3, I tried getting the quaternion euler in vector 3 output then gave it to the multiplier but it still didn't work.
So I figured this out. The order of multiplication matters (A x B). The quaternion output will go into A and Vector output will go into B. The vice versa won't work.
@@gabetheborkingdog5985 Had the same issue here and came up with the same solution. However glad to see I wasnt the only one
This is so helpful.
I have a problem, when I stop moving the player realizes late that I have stopped why ?
Due to drag. Since we are using rigid body, the drag and other forces are also working when u move an object, since there is not friction between your object and ground, it comes to stop a little late. U can increase the drag of your object to check if it works. Or u can add a physics Material to the ground ur object is standing or moving on.
Replace the “Normalize” unit with “vector 3 clamp magnitude” and then set the maximum magnitude to 1
Don't stop Plz 🤝❤️
How doesn’t this dude have 100k + subscribers?????
tutorial on how to add sprinting option with this exact code?
You have more interest in c# or Bolt?
Smart Penguins sir I have in bolt
@@SmartPenguins Bolt please
@@SmartPenguins How about a 4th part detailing sprinting and crouching in both Bolt (or Visual Scripting) and C#?
Is there normally a delay when I stop pressing the key the character doesn't stop for half a second?
Changing GetAxis to GetAxisRaw (horizontal and vertical) seemed to fix it for me, hope it helps :)
On second though/discovery, changing gravity in the input manager under horizontal and vertical should help. Axisraw can make it choppy
@@guyabikhair7066 I thank you good sir. It worked flawlessly.
@@imgone1705 which one did u do?
@@guyabikhair7066 just the first one. I didn't notice the choppy gravity
Why is the fps low
If you don't like it when your character keeps walking for a bit after releasing a walking key, just simply remove the Normalize node!
My player just goes into ground :/
make sure there is a box collider on your floor and that the floor is quite thick not just a flat plane, and make sure the capsule collider is fully lining up with the capsule model for the player
@@Kay-eh8lm thx
@@newcat0761 I changed my advice actually lol after I encountered some problems myself then fixed them
@@Kay-eh8lm whenever i walk my object just falls over and i tried this but it did not work Edit: It now only does it when i walk side ways Second Edit: I fixed it
I know you probably wont read this but i have a problem with when i try to strafe to one side my character instead of just moving that direction moves in a circle
1000 лайков тебе друг! ты лучший!!
Спасибо
I am using Unity 2021 version, so I cannot find float node in Visual Scripting.
And it also shows an error that is:
cannot convert system.single to Unityengine Vector3
Gooooooooooooooddddddddd
doesnt let me multiply vector 3 by the rotation
how camera dosent show the character when rotate in x axis? camera is not parent parent is palyer
The camera is inside the object, it's a child of the object. Also, when camera is inside another object then it can't render that object on screen (you can actually change this now). Also, the flow machine is applied to the player(empty object) which actually a parent of both, the capsule and the camera too. So when u r rotating the camera in x, the capsule also rotates.
When I move my mouse in the x axis it moves the character in that direction. Can you help?
I figured it out
Is there a way to prevent my player from being able to walk up extremely steep walls?
i know i am late but i need help i cant find the float
This and the previous videos are wonderful tutorials so please keep it up! I am having an odd behavior happening with my camera movement. I've implemented the clamp just like the way you did in order to limit the rotation. However, when I begin my game it automatically jumps to the max value and makes it so every time I start the game my player is looking at the ground. Not sure why this is happening but any help would be much appreciated!
make sure your camera rotation is 0, 0, 0
I have a problem with my C# script, when I try to play my game, it just doesn't start and at the bottom of Unity, it says "Error CS0246: The Type or namespace name 'Transform' could not be found" and I also noticed that in your script, the words Transform, and Rigidbody are Light Blue while mine are just white. I think I was supposed to do something to make them blue but idk what, can you please help me?
I just figured out what I was doing wrong. I didn't have Unity snd Visual Studio setup to work properly together. What you have to do is go into Unity and go to Edit, Preferences, External Tools, and then change the "External Script Editor" from "Open by file extension" to "Visual Studio 2022" or to whichever code editor you are using. Then you have to save your script and close Visual Studio, then go into Unity and double click your script to open Unity, the text that needs to vor blue still won't be blue so you have to click on the words that should be blue at the top right above the "Start" area and hit Alt+Enter to bring up the thing that fixes problems, then I forgot exactly what I did but I think I hit enter or I clicked on one of the provided solutions and then hit enter or I did something and then all of the sudden my words turned blue. Also I recommend not using a theme in Visual Studio if you are just starting out learning C# because themes change the colors of words and sometimes make multiple colors into the same color and that makes it a lot more confusing. I love using themes for stuff but unfortunately cannot use them right now
I have a problem when i start the game and try to move, the player literally falls onto the ground and starts to roll, how can i fix this?
Lock x and z rotation on the rigidbidy
Btw new vector 3 is now create vector 3
that was helpful but you should have shown how to make a ground check
ua-cam.com/video/xYatCQSlnvs/v-deo.html&ab_channel=SmartPenguins-GameDev
Thx.
Nice tutorial! But i have a Little issue, my Player is passing through objects when i put a little force on them.
For example: if i am standing on a collider it works fine, but when i am standing in front of a collider and Press W it passes throught it. i've been trying to fix this for 2days so let me know if you could help!
(i have added rigid body to the player and the object, other objects also contain a rigid body & It is not set to trigger, i am using a beam for player)
-Thanks
Can't really see exactly what is going on but,
1) you don't need to add rigid body to object that you don't want to move,
2) if the collider is thin and the movement speed is big enough the you will pass the object
3) on your player rigid body try changing Collision Detection to Continuous see if that helps
@@SmartPenguins 1) oh sorry i meant collider but due to auto correct it changed to rigid body
2) the collider is not thin it is normal, and the movement speed is set to 20 (Per second = 20)
3) I tried changing it to continues, dynamic, and all the other options, it is not working :(
i will try to decrease the speed to see if that works
Do you know how to math.clamp raycast distance? So player wouldn't get a carrot from a mile.
Use the Max Distance option just like I show here ua-cam.com/video/52wcfJWzi-w/v-deo.html
WASD is delayed why is that?
Try using Input.GetAxisRaw(...)
Instead of Input.GetAxis(...)
Just replace the “Normalize” unit with “Vector 3 Clamp Magnitude” and then set the maximum magnitude to 1. I had this same exact issue and someone posted a comment on how to fix it
thank u so much
9:24 dont mind this
hey can you pls help me out cuz when I move my mouse to X axis it makes me float pls help to fix the error
Go onto my discord server and ask the quotation there with a screenshot of your flow graph
i am in , and send in discord"questions" pls help
Need help plz urgent reply....
When make a moving plateform in buildbox my charecter not move with that it stay in that position i have to move it so that it move with plateform ...what to do
Set character to dynamic. Make sure stay awake is on in the character start node options.
@@SmartPenguins cant find stay awake in starter node....
@@SmartPenguins can i send a pic to you so that u can understand easily
My character just falls through the ground 😢 not sure what i did wrong
make sure you have a collider on your ground and you character
Add a mesh collider to the ground
tnx i nede this
I can't find the transform get rotate
It will be transform rotate, with out "get"
Can you please make a tutorial for sprinting please!
just add smth to your velocity if shift is pressed
im having an issue where the player is not moving like at all but the camera works tho
Come over to discord and the community or me can help you out with that.
@@SmartPenguins i fixed it thanks for the tutorial sir and plz make one with animations bools i really need that for my project
@@DXDgamingsubnow Your are The same like Skyward diamond. Please share your solution. I have the same problems. So annoying that ppl found the solution but dont bother helping other ppl. ...
@@m-oi-kahl7225 there were one link that was not right I looked many time and I saw that I connected it to the wrong anchor so yeah check the wires
Why does the movement lag it did not lag for me when I put time.deltatime
Where did you put time.deltatime?
Replace the “normalize” unit with “Vector 3 clamp Magnitude” and then set the maximum magnitude to 1
How do I test if they are on the ground tho with bolt??
it's in the next part ua-cam.com/video/xYatCQSlnvs/v-deo.html&ab_channel=SmartPenguins-GameDev
@@SmartPenguins ahhh yes it wasnt recommended to me so i assumed that was the end thank you! I was like YOU ARE REALLY GONNA LEAVE IT ON THAT??? XD
@@SmartPenguins great devlog btw super good im new to unity and this gave me such a good idea and overview of Bolt! :D
you forgot to make movement to the sides with a, d.
Get axis "horizontal" does that.
@@SmartPenguins hmmm... its not working for me
i fall through my map thats imported from maya
make sure you add colliders
4:38 there isnt a thing as a litterer float for me
same
Did you chose programmer naming in bolt? Because something have different names of you chose programmer or human naming, for example in programmer naming, “New Vector 3” is called “Create Vector 3”
It might be called “Float Literal”
I did it but the player is still not moving
What have you do? Send me more info on discord.
@@SmartPenguins I got it to work I only thing I need to fix it to camera to look and and down
@@skywarddiamond600 how i cant make it move and my graph is exactly the same only the camera works
@@DXDgamingsubnow I did something to get it working
@@skywarddiamond600 what did you do to make it work
Help The Player Falls Through The Floor
You maybe forgot to add a rigidbody or maybe you made the player clip through the floor
@@travalik7006 The Rigidbody Is In There I Think You Need To Set The Ground But Idk How
@@veryezgaming8971 go to the ground and add a mesh collider
I cant find vector 3 new unless im an idiot
look for create vector 3, it will be named different if you use Programing naming or Human naming
@@SmartPenguins ok thanks man your the best👍
you should definitely be slower on node selecting, to understand what node you choosing I must rewatch few times every time. It is painful as hell, you are too fast
Almost first
First here!
5:40
I am
wait isnt there ment to be delta time or something like that?
im at 6:17 and its not letting me multiply the rotation
nvm mangeded to fix it im just bult like that
@@Gamer.Cat22how
@@YoX-p1v you need to change it to a default multiply rather than a special one like vector 3 multiply or something like that. I don't remember once I get back home I will tell you how
I have a problem where when I walk the camera even when it's a child of the player it will gust stay there and the player moves why is this and how can I fix it?