#What s wrong in my script ?
1 messages · Page 1 of 1 (latest)
!code
📃 Large Code Blocks
Use links to services like:
https://paste.mod.gg/, https://hastebin.skyra.pw/, https://paste.ofcode.org/, https://paste.myst.rs/
📃 Inline Code
Surround code with three backquotes. Not quotation marks.
To format as C#, add cs to the first line:
```cs
// Your code here
```
Add a comment with a line number if there is an error message.
euh..
seems like you haven't accurately followed the tutorial
the linearvelocity of a rb2d is a Vector2, it has 2 floats inside, you can't use it as if it were just 1 float
the angularvelocity of an rb2d is a single float, you can't use it as if it were 3 floats as a Vector3
velocity was renamed to linearVelocity in unity 6
so anywhere you see rb.velocity in the tutorial, use rb.linearVelocity instead
but you still have to follow the tutorial accurately aside from that
here is the tutorial
ok
there is another problem:
and you didn't follow it accurately
this is not what the original code said
ah
no but just rb.velocity is obsolete
so i changed with linearVelocity
i dont understand what s wrong
and the prbleme apears when i change rb.velocity
you didn't use linearVelocity there
you used linearVelocityY
you're looking at different points
one line has rb.velocity.y, the other line has just rb.velocity