Impact

This forum is read only and just serves as an archive. If you have any questions, please post them on github.com/phoboslab/impact

1 decade ago by dmen

I duplicated an entity to change graphics and behavior, but they are nearly identical code wise. In one ig.input.mouse.x works fine, but in the other it just returns 0. Does that make any sense to anybody? Both classes require impact.input... I can show both classes if anyone thinks it might help - they are just about 30 lines each, so it's not much code.

1 decade ago by dmen

Got it. I needed to use:
ig.input.initMouse()

In the one that was working, the entity was being instantiated by a game class that had the mouse key bound, so it worked without the above line. In this one, the game class doesn't bind a mouse key, so I needed the init.
Page 1 of 1
« first « previous next › last »