Problem with my Bolt Client, quick question before I proceed.

Hi there - I've made it through the video tuts, the demo project from that, and implemented bolt within my game. I have an iOS game that I am getting to work on the desktop before I implement to devices since I figure it would be harder to debug.

Everything compiles and runs. I make duplicates of the app so I can run multiple copies (OSX). I launch copy A and click Start Server, it starts, the character prefab instantiates, and I drive around.

I launch copy B and a few things happen. 1. my original client A re-appears at 0,0,0 with the new client's player. and 2. copy B controls player A and copy A controls player B. What a mess.

I figure either this is a real newbie thing to do and I've flip-flopped something somewhere, or I am having a problem with public vars. I see that everything in the demo runs within public class { public override void simulateowner () { while I have a bunch of public vars at the start of the class. It is possible that the client is accessing a public var and changing it, moving the other player. Though I'd expect that to move both players. Not sure.

Does this sound familiar to anyone? I didn't want to spend a lot of time re-arranging my vars if that wouldn't do it.

Thanks for your time.

Comments

  • Could be a few things, but I don't think it is public vars. My guess is you probably are always attaching your camera/controller and such on both objects instead of just the controller. So make sure any components you only want on the controller are enabled, and disabled for other entities. Also make sure your input routines on the BoltEntity only run for the controller.
  • Oh that's interesting. My Camera is parented to the player and a part of the prefab. the canvas / ui for the touch controls are an overlay of that camera, and the canvas is also parented to the player prefab. This was to prevent all the scripts from breaking /unpopulating their gameobjects.

    It was all working great of course when there was only one player. I will start by checking the input routines first, since that may be an easier fix.