Author Topic: TNet: Problem with SendQuickly  (Read 8026 times)

Filip

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 13
    • View Profile
Re: TNet: Problem with SendQuickly
« Reply #15 on: December 28, 2013, 07:34:19 AM »
Sorry for late reply, I have been away for a christmas trip.

TNManager is located in my startup scene, yes. It is attached to the same gameobject as where TNAutoJoin is attached. TNAutoJoin joins another scene where the actual game content is. (Just like your multiplayer tutorial with dedicated server).

Quote
I don't recommend synchronizing position and rotation using TNAutoSync when using mecanim motions. Sync whatever causes the motions states to change, or the changed states themselves. This way each client will have an up-to-date set of states and do their own movement logic.
I am not talking about incompatibility with TNAutoSync and Mecanim. I understand that TNAutoSync is generally not good for syncing your "main character". I am talking about that I believe it's impossible to structure my game objects like you mentioned:
Quote
Rigidbody, TNObject
- Collider 1
- Collider 2
- GameObject with LagPosition (and possibly LagRotation) on it
-- Renderer

Apply root motion will cause the "GameObject" to move relatively to the "Rigidbody", in such way the Rigidbody itself will not be affected by the Mecanim's movement. The colliders will stay in the same fixed global position while the GameObject with the attached animator will move around. The problem I'm facing is that I don't know how to tell Mecanim to apply root motion onto the Rigidbody instead of the GameObject.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: TNet: Problem with SendQuickly
« Reply #16 on: December 28, 2013, 05:08:32 PM »
Mecanim's root motion moves the rigidbody in an uneven, animation-controlled fashion. It's very difficult to sync this over the network fluidly. Your best bet is to either sync whatever causes the root motions to occur (such as joystick thumb position), or not use root motions. Animation-controlled movement is great for the main character of single player games, but it's a bad idea for everything else as the blended animation movements are often unpredictable.

Filip

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 13
    • View Profile
Re: TNet: Problem with SendQuickly
« Reply #17 on: December 28, 2013, 06:13:14 PM »
Good point Aren, It is probably best to inactivate root motion like you say, and apply the speed to the rigidbody parent directly.

I am finding TNet more and more appealing to my project. It's really agile and easy to work with. Keep it up and thanks for the support!

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: TNet: Problem with SendQuickly
« Reply #18 on: December 29, 2013, 01:27:42 AM »
I'm glad you like it! :)