Still constant jumping even with raycasting.
RaycastHit hit;
if (Physics.Raycast(transform.position, Vector3.down, out hit, 1.01f)); {
canJump = true;
}
if(canJump && Input.GetKeyDown("space")) {
canJump = false;
GetComponent<Rigidbody> ().AddForce (0, jumpingForce, 0);
}
}
}
Comment
Your answer
Follow this Question
Related Questions
Jump Using Raycast. 0 Answers
C# Door Script Problem 0 Answers
I want ray cast in 4 directions, instead i am getting this. 1 Answer
Raycast not changing value 0 Answers