filmov
tv
How To Make A Player Controller With Unity 6. No Physics, Visual Scripting With Input System 2025

Показать описание
==========
movePlayer?
==========
1) add player input (so keyboard is detected)
2) add script machine and create new (use easy-to-read name)
3) add moveSpeed variable float (to set speed)
4) add node "on input system event vector 2" node, set [ Move ] as input action
• find this here: rightClick graph background, Add node: Events ► Input ► the ones with thunder icon
5) Multiply moveSpeed with Axis Output of "On Input System"
6) Multiply this result with deltaTime (to smooth movement)
7) Get X and Y from axis output of the "On Input System"
8) add a newVector3 node and connect X to X, Y to Z.
9) get position and ADD with this vector3 output.
10) connect On Input System green arrow to Set position
11) connect the ADD result in the Set Position
============
playerJumping?
============
(This is shown in the video linked on the bottom)
1) add jumpForce variable float
2) add "on input system event button" node, set [ Jump ] as input action
3) add new vector3 node
4) connect speedForce to Y
4) connect vector3 output to AddForce
5) change AddForce mode to Impulse
----------
Notes:
----------
• Turn OFF "Human Naming", so you need nodes with similar names to C#. This helps you to learn C# and backward engineer C# scripts you find online.
► In Unity Editor, click Edit ► Preferences ► Visual Scripting --- It's there above "100" Max Search Results.
• Make sure you are using Input System (not the legacy).
► In Unity Editor, click Edit ► Project Settings ► Player --- go down, almost 3/4 near the end... above Script Compilation block. There's a "Active Input Handling". Set [ Input System Package (new) ]
O_O!
Want with physics? Check out this other video:
movePlayer?
==========
1) add player input (so keyboard is detected)
2) add script machine and create new (use easy-to-read name)
3) add moveSpeed variable float (to set speed)
4) add node "on input system event vector 2" node, set [ Move ] as input action
• find this here: rightClick graph background, Add node: Events ► Input ► the ones with thunder icon
5) Multiply moveSpeed with Axis Output of "On Input System"
6) Multiply this result with deltaTime (to smooth movement)
7) Get X and Y from axis output of the "On Input System"
8) add a newVector3 node and connect X to X, Y to Z.
9) get position and ADD with this vector3 output.
10) connect On Input System green arrow to Set position
11) connect the ADD result in the Set Position
============
playerJumping?
============
(This is shown in the video linked on the bottom)
1) add jumpForce variable float
2) add "on input system event button" node, set [ Jump ] as input action
3) add new vector3 node
4) connect speedForce to Y
4) connect vector3 output to AddForce
5) change AddForce mode to Impulse
----------
Notes:
----------
• Turn OFF "Human Naming", so you need nodes with similar names to C#. This helps you to learn C# and backward engineer C# scripts you find online.
► In Unity Editor, click Edit ► Preferences ► Visual Scripting --- It's there above "100" Max Search Results.
• Make sure you are using Input System (not the legacy).
► In Unity Editor, click Edit ► Project Settings ► Player --- go down, almost 3/4 near the end... above Script Compilation block. There's a "Active Input Handling". Set [ Input System Package (new) ]
O_O!
Want with physics? Check out this other video: