C
C#5mo ago
ta

Good afternoon, could anyone help me with some C# code?

I'm trying to make a shooting system, like those ship games. But it's not working very well, no shots are moving.
No description
11 Replies
ta
ta5mo ago
i like chatgpt
i like chatgpt5mo ago
public float velocidadeDoLaser = 1.0f; // specify the correct value instead of the default 0.
public float velocidadeDoLaser = 1.0f; // specify the correct value instead of the default 0.
ta
ta5mo ago
like this?
No description
i like chatgpt
i like chatgpt5mo ago
Don't forget the assignment operator =.
ta
ta5mo ago
where do I have to add it?
i like chatgpt
i like chatgpt5mo ago
No description
i like chatgpt
i like chatgpt5mo ago
public float velocidadeDoLaser = 1.0f; // specify the correct value instead of the default 0.
public float velocidadeDoLaser = 1.0f; // specify the correct value instead of the default 0.
ta
ta5mo ago
like this?
No description
i like chatgpt
i like chatgpt5mo ago
Adjust this value based on your test. I don't use Unity here so I don't know what the appropriate value for it is.
ta
ta5mo ago
I did this, but the script is not being passed to the clones
No description
Buddy
Buddy5mo ago
You need to change and apply the value on prefabs too. Press overrides -> apply Top left in the inspector