I’m having some trouble using some code for this program. I’m new to Unity and I’m trying to learn the basics before trying to attempt anything arduous. I’ve been watching videos by a user on Youtube, but the problem is that the code he gives me in his video doesn’t seem to work for me. Here’s the video and the script is at 6:53 http://www.youtube.com/watch?v=5wxe1IUu5QA&feature=channel
I will appreciate it if someone could help me with this could and could provide any tips that can help me. Thank you in advance.
Are you getting errors and if so what is happening. If there are no errors have you attached your script to a game object yet or is it just in your scripts folder?
I am getting errors. I initially tried posting it vertically then horizontally and so forth, but I am still getting errors.
Here are some screenshots.
Could you post the actual errors. If they are in the .png I can’t read them. Just cut and paste them into your post.
Uhh actually the last time I posted when I said I got errors. I was referring to the last time I tried this. I just tried now and I’m not getting a message, but nothing happens. I can’t control the sphere and it doesn’t drop.
Is your script attached to a game object?
uhh how can I tell? I dragged the move around icon up to the sphere like it asked me to in the video.
If your script is attached to the sphere you will see the script name in the inspector window when you select the sphere in the scene window. You will also see any public variables that can be modified through the inspector.
Looks like you attached it twice. You can remove one.
I had detached one of those, but it’s still not dropping. What is the source of the problem?