L
L
LOGiT_leman2020-04-15 00:27:31
Unity
LOGiT_leman, 2020-04-15 00:27:31

Lever in Unity 2d c#?

Guys I have a question, does anyone know how to make a lever?
Well, what if you press the lever to open the gate for example.
Who knows please help!
Thanks in advance

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
DanielMcRon, 2020-04-15
@DanielMcRon

The usual logic, there are raycasts for interacting with the world, so that when hovering over, you can control the object. Then when the raycast is on the object and when the button is pressed, the script at the lever is called. In this script, the lever goes down and lifts the doors up. Nothing complicated, just need to think

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question