I made this new one on my profile its calle project oculus
zoomzoom1001000
Creator of
Recent community posts
im trying to make a flappy bird game where the game will quit i got that but i cant get the flappy bird script to work the player just falls can someone help me make it not fall thorugh the ground i have a colider rigid body PLS HELP!
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class FlappyBirdScript : MonoBehaviour
{
// Move speed for the player
public float moveSpeed = 5f;
// Upward force applied to the player when space bar is pressed
public float upwardForce = 5f;
// Gravity force applied to the player
public float gravity = 9.8f;
// Initial position of the player
Vector3 initialPosition;
// Rigidbody component of the player
Rigidbody rb;
// Initialization
void Start()
{
// Store the initial position of the player
initialPosition = transform.position;
// Get the rigidbody component of the player
rb = GetComponent<Rigidbody>();
}
// Update is called once per frame
void Update()
{
// If the player has fallen below the ground, reset their position to the initial position
if (transform.position.y < initialPosition.y)
{
transform.position = initialPosition;
rb.velocity = Vector3.zero;
}
// Move the player to the right
transform.position += Vector3.right * moveSpeed * Time.deltaTime;
// Apply gravity to the player
transform.position += Vector3.down * gravity * Time.deltaTime;
// Check if the space bar was pressed
if (Input.GetKeyDown(KeyCode.Space))
{
// Apply upward force to the player
rb.velocity = Vector3.up * upwardForce;
}
}
} is the script btw
So u fixed it? because the hands are just stuck on the ground when i tried last time and didnt work but thx i will see if it works now! ps i am making a game also called Monke Move i am updating it today! i got multiplayer working i really hope i get some players :) ima ply ur game now tho! it is not fixed i tried to turn of controlelr but nope pls fix i use htc vive the non pro so yeah