Let's say I've got a class called PlayerInfo.
I'd like to freeze the player from moving. This is the same as teleporting the player to their frozen location every frame right?
So I'm looking at the OnFrame universal hook.
The problem I'm having is that the OnFrame hook doesn't have a BasePlayer param, so my question is what's the best way to access the BasePlayer info from a hook that doesn't pass it as an argument?
Thanks
public class playerInfo
{
public bool isFrozen;
public Vector3 frozenLocation;
}I'd like to freeze the player from moving. This is the same as teleporting the player to their frozen location every frame right?
So I'm looking at the OnFrame universal hook.
void OnFrame()
{
if(playerInfoInstance.isFrozen){
// don't allow the player to move
player.Teleport(playerInfoInstance.frozenLocation);
}
}The problem I'm having is that the OnFrame hook doesn't have a BasePlayer param, so my question is what's the best way to access the BasePlayer info from a hook that doesn't pass it as an argument?
Thanks