[Pogamut-list] Noise and pickup Listeners

fireball787b pogamut-forum at diana.ms.mff.cuni.cz
Mon Dec 31 16:26:48 CET 2012


Noise and pickup Listeners

Author: fireball787b

Hi!

I'm playing with some listeners like Noise and pickup object listeners and i have a problem.

    IWorldEventListener botHearNoiseListener = new IWorldEventListener() {

        @Override
        public void notify(HearNoise event) {
           //escoltar si hi ha soroll pel voltant, d'on ve, com ha sigut produit...
            body.getCommunication().sendGlobalTextMessage("Noise source:  " + event.getSource().toString());  
            body.getCommunication().sendGlobalTextMessage("Noise type:  " + event.getType());     
            body.getCommunication().sendGlobalTextMessage("Noise rotation:  " + event.getRotation().
            body.getCommunication().sendGlobalTextMessage("Noise distance:  " + event.getDistance());  
        }
    };

the 2 last code lines (rotation and distance) doesn't work until the bot dies. if i shoot him with the shootgun he dies and i can see the rotation and distance but if i shoot near the bot the rotation is [0.0, 0.0, 0.0] and the distance is 0.

Does anyone know why this happens?

-- 
Reply Link: <http://diana.ms.mff.cuni.cz/main/tiki-view_forum_thread.php?forumId=6&comments_parentId=1096#form>




More information about the Pogamut-list mailing list