Obi Official Forum
Why is ObiRopeCursor handling input? - Printable Version

+- Obi Official Forum (https://obi.virtualmethodstudio.com/forum)
+-- Forum: Obi Users Category (https://obi.virtualmethodstudio.com/forum/forum-1.html)
+--- Forum: Obi Rope (https://obi.virtualmethodstudio.com/forum/forum-4.html)
+--- Thread: Why is ObiRopeCursor handling input? (/thread-2261.html)



Why is ObiRopeCursor handling input? - the80srobot - 22-05-2020

I'm using the new input system in Unity, which means I tend to discover random places where asset store packages try to use the old Input.GetKey API, because it now throws exceptions.

One place that I was surprised to find Input code in was the ObiRopeCursor - it's not placed in a Samples directory, so it looks like a reusable class, but it specifically listens for the Q and E keys to control its length. Is this a mistake, or intended?

Thanks.


RE: Why is ObiRopeCursor handling input? - josemendez - 22-05-2020

(22-05-2020, 10:59 AM)the80srobot Wrote: I'm using the new input system in Unity, which means I tend to discover random places where asset store packages try to use the old Input.GetKey API, because it now throws exceptions.

One place that I was surprised to find Input code in was the ObiRopeCursor - it's not placed in a Samples directory, so it looks like a reusable class, but it specifically listens for the Q and E keys to control its length. Is this a mistake, or intended?

Thanks.

Ooops! that's a mistake. The entire Update method of the cursor should not be there. It's safe to remove it.

Thanks for spotting and reporting this!