// PlayerScale.cs using Simuspaces.Simulation; public class PlayerScale : SimuScriptBase { public SceneObject ClickObject; public bool scaleClickingUser = true; public string targetUsername = "*"; public float testScale = 1.35f; public bool highlightObject = true; public float interactDistance = 10f; bool scaledUp; public override void Start() { if (ClickObject == null || ClickObject.IsNull) { Log("[PlayerScale] Slot a SceneObject into ClickObject first."); return; } MakeInteractable( ClickObject, OnClicked, highlightObject, null, true, interactDistance, "Toggle scale"); Log("[PlayerScale] Interactable registered on " + ClickObject.ObjectId); } void OnClicked(SVInteractionInfo info) { string target = scaleClickingUser ? info.Username : targetUsername; if (target == null || target.Trim() == "") target = "*"; target = target.Trim(); float nextScale = scaledUp ? 1f : testScale; if (target == "*") SetAllPlayerScales(nextScale); else SetPlayerScale(target, nextScale); scaledUp = !scaledUp; Log("[PlayerScale] " + info.Username + " clicked " + info.ObjectName + " and set '" + target + "' scale to " + nextScale); } }