21 Replies
I was trying to stop an object from rotating
with the transform.rotation
and the defaultRotate
remove all methods and add one by one, that's one thing you can try
you mean Start() and Update()?
even the class, eventually
if you auto-format the file what does come out?
how do u do that
oh you're missing
namespace ............. {
after using
slike that?
is this clear?
what does it do?
it's to give a name of the location where you are putting your code
so in this case the full name of the class would be
YourNamespace.PlayerMovement
the problem is actually the
public static
member in the Start()
method, u can only declare members at class leveloh
aaaaa i missed that
i thought "weird, namespace should be implicit"
that works
i named it globalos because i already had a class named globals
u could also just make it a static field for
PlayerMovement
i don't even know what that is
thanks its working
and usually u would probably make it
readonly
and set it its value directly
public static readonly Quaternion DefaultRotate = ....;
yea
but i think that i will leave it as it is
cuz after that ill try to rotate the player
not stop him from doing that