Related
View allVishal ParmarSyahi
@vp945912 · · One-liner
A vp945912 One-liner
using UnityEngine;
public class PlayerMovement : MonoBehaviour
{
public CharacterController controller;
public float speed = 12f;
public float gravity = -9.81f;
public float jumpHeight = 3f;
Vector3 velocity;
bool isGrounded;
public Transform groundCheck;
public float groundDistance = 0.4f;
public object groundMask;
void Update()
{
// चेक करें कि प्लेयर जमीन पर है या नहीं
isGrounded = Physics.CheckSphere(groundCheck.position, groundDistance, (LayerMask)groundMask);
if (isGrounded && velocity.y < 0)
{
velocity.y = -2f;
}
// कीबोर्ड इनपुट (WASD या Arrow Keys)
float x = Input.GetAxis("Horizontal");
float z = Input.GetAxis("Vertical");
Vector3 move = transform.right * x + transform.forward * z;
controller.Move(move * speed * Time.deltaTime);
// कूदने (Jump) के लिए कोड
if (Input.GetButtonDown("Jump") && isGrounded)
{
velocity.y = Mathf.Sqrt(jumpHeight * -2f * gravity);
}
// ग्रेविटी (गुरुत्वाकर्षण) लगाना
velocity.y += gravity * Time.deltaTime;
controller.Move(velocity * Time.deltaTime);
}
}
Starring @vp945912
A yadavnikkhil One-liner
Bas ek prompt likho, aur video khud kahani ban jaayeStarring @yadavnikkhil
A mahesher99 Tagline
IndianTapToto3D/
├── Assets/
├── Scripts/
├── Cars/
├── NPC/
├── Player/
├── House/
├── UI/
└── Scenes/Starring @mahesher99
A harinduharin One-liner
A single neutron collides with uranium, and the nucleus decides to split the future.Starring @harinduharin
A chhindersing Tagline
ai video Starring @chhindersing
A dambarsaud01 Tagline
This section uses our Ai called alyana to help you draft your perfect post.alyana improve your post if necessary and returns it back for you to decide what you want to proceed with Starring @dambarsaud01
A knowledgeinf One-liner
The branch of science which deals with the quantitative relationship between heat and other forms of energies is called thermodynamics.
Starring @knowledgeinf
Vijendra GuptaAawaz
@vijendra_vg12 · · Monologue
A vijendra_vg12 Monologue
the unjust or prejudicial treatment of different categories of people, especially on the grounds of ethnicity, age, sex, or disability.Starring @vijendra_vg12
0 comments
No comments yet.