33 Replies
Forgot a semicolon
omg its just that
thx so much damn
while you are here
can you help me with that error
one of the variables is likely a double so the rest is promoted to double as well, so Math.Sqrt returns a double and you are trying to assign it to a float
it recommend to write (float)
it seem it fixed it
is it normal that i have to create a lot of serializeField for many things ?
In Unity? Yeah
Anything you want exposed to the inspector has to be a
SerializeField
That said, if you don't want to expose something, no need for that attributeoh okay
sorry last question
why
and thx so much for your past answer
The error is quite clear
oh
rb.linearVelocity
is a float
You're trying to give it a Vector2
ok so i erase vector2 ?
Square peg does not fit round hole
ye but
Idk, do you?
in tutorial video he does it
ok i juste put = JumpForce
it doesn't work
he just goes in the air
You sure it's suppossed to be
linearVelocityY
and not, say, linearVelocity
? Double-check with the tutorialactually it was linearVelocity.x
now it says that :
could try removing Vector2 so it only says new(...)
Do you have a
using System.Numerics
reference? If so, remove it
Would target-type new()
work in Unity?ok i try
not sure which version unity use, probably something old
Standard 2.0 IIRC
seems like c# 7.3, so might not work
i have the latest one
with this he also goes in the air
the tutorial seems old
i try will try with a more recent one
thx for everything
Don't follow tutorials blindly
You will learn nothing from it
Learn C# first then move to Unity when you feel ready