[Opensim-users] Detect distance from BOT to the chatting avatar.
Tomas Trescak
tomi.trescak at gmail.com
Thu Nov 4 14:23:59 UTC 2010
Dears
I need to detect distance from my bot to the chatting avatar.
I have an event handler in my BOT that detects chat messages:
Client.Self.ChatFromSimulator += HandleClientSelfChatFromSimulator;
This method should only do something if avatar is close enough to my BOT
private void HandleClientSelfChatFromSimulator (object sender, ChatEventArgs e)
{
// detect distance and possibly execute
}
THE BOT
My problem is that the coordinates I receive in ChatEventArgs.Position are not compatible with any coordinates that I hold in: Client.Self.SimPosition or Client.Self.RelativePosition or Client.Self.GlobalPosition
How do i convert from LOCAL coordinates received in e.Position to any coordinates that I have in Client.Self?
Any help is greatly appreciated
Thanks!
Tomas
More information about the Opensim-users
mailing list