ItemSubscribed events

void.pointer
edited July 2010 in Photon Server
Hello,

So we're trying to test out a custom written Unity Photon client that communicates with the Photon MMO Demo Server. Client A connects to the server, creates the world, and enters it. The server now has 1 actor in its 1 world. Later client B enters that same world. The server now has 2 actors in its 1 world. At this point, I noticed that MmoClientInterestArea.OnItemSubscribed() is never called. Both entities are in the same position (0, 0, 0) in the world and their interest area boundaries are identical.

What is supposed to happen at this point? Aren't there supposed to be item subscribed events being sent?

Comments

  • it could be that the position 0,0,0 is outside of your world dimensions?
  • That doesn't seem to be the case:
    		public static void CreateWorld( Session session, string worldName )
    		{
    			Vector topLeft = new Vector( -100, 100, 0 );
    			Vector bottomRight = new Vector( 100, -100, 0 );
    			Vector tileDimensions = new Vector( 10, 10, 0 );
    			
    			Hashtable data = new Hashtable();
    			data.Add( (byte)ParameterCode.WorldName, worldName );
    			data.Add( (byte)ParameterCode.TopLeftCorner, (float[])topLeft );
    			data.Add( (byte)ParameterCode.BottomRightCorner, (float[])bottomRight );
    			data.Add( (byte)ParameterCode.TileDimensions, (float[])tileDimensions );
    			
    			session.SendOperation( OperationCode.CreateWorld, data, true, Settings.OperationChannel );
    		}
    
  • and whats the item interest area radius?
  • did you check if CreateWorld succeeds? it won't replace existing worlds that have the same name and thus there may be different dimensions on the server than you think.
    Best will be you add some server logging or you step though it with the debugger.
  • Boris wrote:
    did you check if CreateWorld succeeds? it won't replace existing worlds that have the same name and thus there may be different dimensions on the server than you think.
    Best will be you add some server logging or you step though it with the debugger.
    On the client I am getting a successful response back.
  • Boris, I also want to add that we are only ever creating 1 world. That makes replacing existing worlds a non-issue I would think.
  • True enough. What might be a problem is that your bottom coordinate is smaller than the top one.