0

can someone help me with something in unity 2D programming with Microsoft visual

I have created a character in unity for a 2D game with top down view, to put movement commands I had to use Microsoft visual and use the C # programming language, when I put the command { Public float speed = 1.0f; Private rigidbody2d rb2d; } The "rigidbody2d" does not recognize me as a command nor does the "rb2d" and other commands does not recognize me as one, and I have seen tutorial videos to see what the problem is but none gives me a solution, I have tried other commands that I have seen on Youtube but they are always the same, if someone can help me to solve this problem or if you can give me a command so that my player can move freely with the keys I will be very grateful, if you need more information about the command I can put the command whole

1st Jul 2020, 1:24 AM
Agustín Sanchezt
Agustín Sanchezt - avatar
5 Antworten
+ 3
Is 'rigidbody2d' all lower case in your code?
1st Jul 2020, 1:29 AM
♡Addy♡
♡Addy♡ - avatar
1st Jul 2020, 4:54 AM
Gordon
Gordon - avatar
+ 2
Hey Agustin, are you still encountering this issue? Has Gordon's response solved the problem by instead using RigidBody2D? If not, does your IDE detect other classes such as, Vector2 or Vector3 Do you have "using UnityEngine" at the top of your program?
7th Jul 2020, 5:39 PM
Rrestoring faith
Rrestoring faith - avatar
0
I saw in a YouTube video how the command did and when he wrote "rigidb" he already had the option to complete the word with "Rigidbody2D", that option did not work for me
1st Jul 2020, 1:35 AM
Agustín Sanchezt
Agustín Sanchezt - avatar
0
Another thing is that when the video completed the word "Rigidbody2d" it changed color to green, it did not change it for me
1st Jul 2020, 1:36 AM
Agustín Sanchezt
Agustín Sanchezt - avatar