Author Topic: Assigning correct player controller  (Read 3845 times)

Hammerite

  • Newbie
  • *
  • Thank You
  • -Given: 1
  • -Receive: 1
  • Posts: 8
    • View Profile
Assigning correct player controller
« on: October 10, 2015, 10:38:38 AM »
My name is Harry, i am a student studying Game Design. I have recently purchased TNET and loving it so far. I am currently working on a mmo and have been trying to lay out the basic net code. I admit that Net code isn't one of my strong points.

I have the problem where when two or more players join the server, the cameras and playerControllers are getting mixed up. I have ruled out the problem where both clients can control themselves and each other. The problem now is that each new player that joins has control over all of the others and all other players are seeing through his camera. If anyone knows what will fix this please can you help. I will leave a attachment of my wip player controller.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Assigning correct player controller
« Reply #1 on: October 10, 2015, 11:48:57 PM »
Your camera shouldn't be a part of your player. It should be a separate object that will follow a very specific player -- in your case the player you are controlling (tno.isMine).

Btw... you're a student, you admit net code isn't your strong suit, and you're making an MMO? Might want to start with something smaller first...