Player movement/rotation hook?
Discussion in 'Rust Development' started by greyhound, Dec 6, 2017.
-
Wulf Community Admin
You could probably hook when their transform has changed, but not sure where.
-
Hmm.. Interesting.
Are there any plugins that do something similar? -
Wulf Community Admin
-
Yeah I think so as well
-
Attach your custom component to player and check for Transform.hasChanged.
For movement it should be working, but unsure about rotation, it's handled in a different way. -
What else could the component be attached to? -
Attaching is simple:Code:player.gameObject.AddComponent<YourClassName>();
-
I think that'll do it actually. Thanks!