Does anyone have a solution to this problem?
Hi,
Please use code tags in your future posts (instead of attachments.)
velocity.y = Mathf,Sqrt(jumpHeight * -2f * gravity);
Should be:
velocity.y = Mathf.Sqrt(jumpHeight * -2f * gravity);
You need to be accurate with coding. You should have seen some error notification in your IDE when you tried that code, too. Red squiggly line there…?
this is what it says.
Thank you it is now working
Did you read what I actually wrote? Just fix the typo and your code will compile. That comma you have written there erroneously causes the compiler error.
@Ryiah the code was earlier included as an attachment… But looks like it’s been now removed from the OP. And there was one single typo, which I pointed out, and it fixed the compiler errors.
Yeah I removed my post after I typed it up because I realized it had to have existed at some point.
@actab001 It’s not really useful / good to remove already posted code/information. There’s not much benefit to others later if the original problem is missing. And this is not a “have your work done for free” forum.