Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - thelebaron

Pages: [1]
1
TNet 3 Support / Re: stackoverflowexception tnet & astar pathfinding
« on: June 17, 2014, 07:00:34 PM »
What Im trying to send is a System.Collections.Generic.List<Vector3>. How do I do a debug to verify the data?

2
TNet 3 Support / stackoverflowexception tnet & astar pathfinding
« on: June 17, 2014, 02:18:41 AM »
I'm trying to couple the Astar pathfinding project with tnet, and sending the path over via rfc seems to cause a stackoverflowexception, maybe the path is too much data? Besides performance issues of sending alot of data, is there a limit of what can be sent(I believe what is being sent is a list of vector3's, how much exactly Im not sure). I was wondering if you knew of any multiplayer enabled pathfinding solutions, this seems to be something I havent had any success in finding for unity.

3
TNet 3 Support / Putting the TNet folder into the plugins directory?
« on: June 13, 2014, 02:36:33 AM »
I was wondering if TNet will function properly from there, Im trying to get it to work in conjunction with Behaviour Designer and the only way I can see of making it work is by dropping the TNet folder in the Assets/Plugins folder, however that seems to break the TNAutoSync script(after doing when adding this script it says "multi-object editing is not supported" - even if only one object is selected). Are there any other pitfalls of attempting this?

4
TNet 3 Support / Multiple rfc calls during lag, tips to avoid?
« on: April 19, 2014, 08:43:22 PM »
Alright I have a simple setup where an rfc will be called during the death of an object, but I am assuming that when there is lag due to physics, it seems like the rfc gets called a bunch of times.  I'm not really sure how to prevent this, any tips?

video example https://onedrive.live.com/#cid=8D4EBD699F0CC823&id=8D4EBD699F0CC823%2114400&v=3


  1.  
  2.                 if(TNManager.isHosting && health <= 0)
  3.                 {
  4.                         // Die if no health left
  5.  
  6.                         tno.Send ("NetworkDestroyObject", Target.AllSaved);
  7.                
  8.                 }
  9.  
  10.  
  11.  
  12.  
  13.         [RFC]
  14.         public void NetworkDestroyObject()
  15.         {
  16.         Debug.Log("Killobject d Received");
  17.         if (TNManager.isHosting)
  18.                 {
  19.                 TNManager.Create(ragdollPrefab, this.transform.position, this.transform.rotation);
  20.                 //Debug.Log("Hosted object should be destroyed!");
  21.                 TNManager.Destroy(this.gameObject);
  22.                
  23.                 //Destroy(gameObject);
  24.                 }
  25.    }
  26.  

These are the bits specifically that handle the death bit.

5
TNet 3 Support / rfc's over autosync?
« on: February 27, 2014, 03:20:25 AM »
Just wondering, besides things the fact that rfc's give you more control over things, is there a reason to use them over TNAutosync for basic stuff like position and rotation? I see in the multiplayer starter game kit the controller has both rfcs and an autosync setup for movement/position, can someone tell me why both are needed?

6
thanks guys   8)

7
TNet 3 Support / Exception has been thrown by the target of an invocation.
« on: February 23, 2014, 02:36:26 AM »
Not really sure why Im getting it but Im currently getting this error in the log constantly but the autosync still works(albeit it looks jumpy).

Exception has been thrown by the target of an invocation.
TNAutoSync.OnSync (UnityEngine.Quaternion, UnityEngine.Vector3)
UnityEngine.Debug:LogError(Object)
TNet.UnityTools:PrintException(Exception, CachedFunc, Object[]) (at Assets/TNet/Client/TNUnityTools.cs:83)
TNet.UnityTools:ExecuteAll(List`1, Byte, Object[]) (at Assets/TNet/Client/TNUnityTools.cs:162)
TNObject:Execute(Byte, Object[]) (at Assets/TNet/Client/TNObject.cs:310)
TNObject:FindAndExecute(UInt32, Byte, Object[]) (at Assets/TNet/Client/TNObject.cs:334)
TNManager:OnForwardedPacket(BinaryReader) (at Assets/TNet/Client/TNManager.cs:826)
TNet.GameClient:ProcessPacket(Buffer, IPEndPoint) (at Assets/TNet/Client/TNGameClient.cs:684)
TNet.GameClient:ProcessPackets() (at Assets/TNet/Client/TNGameClient.cs:627)
TNManager:Update() (at Assets/TNet/Client/TNManager.cs:834)

8
TNet 3 Support / Re: Firing state via RPCs only occurs on host?
« on: February 20, 2014, 05:03:03 AM »
nevermind I got it working with some rejigging, although tbh im not even sure why it works vs before

9
TNet 3 Support / Re: Firing state via RPCs only occurs on host?
« on: February 19, 2014, 10:47:33 PM »
edit: ok so can the tno.Send part be split to a different scripts RFC it calls? just tried it with two different scripts that weren't referenced to each other and I guess it doesnt work?

Doing as you said does work, with the send and RFC both on one of the parent scripts.

Any insights as to why when put further down the hierarchy might only allow for host --> client messages?

10
TNet 3 Support / Re: Firing state via RPCs only occurs on host?
« on: February 18, 2014, 12:05:51 PM »
The thing is it doesn't work(host to client) if I disable the code so the message is getting through at least one way. I'll give simplifying a try though

11
TNet 3 Support / Firing state via RPCs only occurs on host?
« on: February 17, 2014, 04:38:59 PM »
I have an RPC to send the firing state but it only seems to register on the host to client but not client to host, when the client fires nothing happens

 tno.send("Fire", Target.All);

So Im just going by what was mentioned here(http://www.tasharen.com/forum/index.php?topic=6728.msg31607#msg31607), actually its just the firing state not the on/off but anyway it only seems to register on the host. the full code is a little convoluted as Im trying to get it to work with ufps. I know it doesnt seem like much to go on, but is there something completely obvious I am missing in doing this?


let me just modify this by adding is this something to do with having subobjects of the main gameobject having tnobjects which dont seem to get an assigned number?

12
TNet 3 Support / Re: UnityTools reference - new install
« on: February 16, 2014, 04:48:11 PM »
its definitely the mechanim ai asset, I also just ran into this(i think it just got renamed to "node based ai system")

13
TNet 3 Support / Re: TNet syncing issue
« on: January 09, 2014, 01:32:23 AM »
Actually I think Im still having a few issues, basically I have some rigidbodys in a scene. There is no movement except by collisions with players, and their rotation is constrained except on the Y axis so they kind of glide around.

When I push them around using a nonhost player, they sometimes sort of desync. If the host bumps into the desynced rigidbody on a nonhost screen, they can still push them around. If a host bumps into a desynced(for everyone else but not the host) rigidbody on the host's screen they reset/snap into place for the nonhost players.
I am using the example spring transform and decoupled renderer from rigidbody setup.

Is this an inertia thing? When using the Syncrigidbody with simple boxes it works, but the 'gliding' seems to only work for a bit and then it just fails to sync up.



 I also had a quick question about setting up moving objects:

"- GameObject with LagPosition (and possibly LagRotation) on it
-- Renderer"

what is the lag position and lagrotation? Is that the lerped position/rotation or something else?

14
TNet 3 Support / Re: TNet syncing issue
« on: January 06, 2014, 01:54:05 PM »
Ok false alarm, i fixed it by using the TNsyncrigidbody instead of TNautosync. Shouldnt they do the same thing? why would autosync only work after something has been instantiated(but it actually seems to be syncing some health values I setup, just not the position/rotation values of the transform on the non instantiated prefabs)?

15
TNet 3 Support / TNet syncing issue
« on: January 06, 2014, 11:28:23 AM »
So I am just starting out with tnet, switching from photon. Im also rather new to coding so anyways.
Im having a issue where objects that already exist within a scene dont really seem to sync in terms of position(using TNAutosync observing position and rotation), whereas objects that are instantiated using TNautocreate do get synced.
They are the same prefabs, so Im wondering what Im doing wrong?

Pages: [1]