Game Development Community

Mouse Events and Script Objects

by Frédérick Imbeault · in Torsion · 07/14/2010 (4:15 pm) · 0 replies

Hello,

I was wondering if there is anyway way to get mouse events in a ScriptObject. What I want is know when the mouse is clicked inside my ScriptObject class. I tried to use theses calls but it doesn't seems to work :

%this.setUseMouseEvents( true );
%this.setMouseLocked( true );

What I get in the log file is :

Unknown command setUseMouseEvents.
Object (1349) physics -> ScriptObject -> SimObject

Is there a way I could do this ?

Thanks !