This is not the correct way to format that conditional. Unless I'm mistaken, the only syntactically correct way to accomplish what you want is like this:
if (Vector3.Distance(playerTransform.position, button1Transform.position) <= distToOpen || Vector3.Distance(playerTransform.position, button2Transform.position) <= distToOpen) {
Hope that helps,
Klep
↧