Problem with ExecuteCommand
Aslan85
✭
Hi everybody,
I’m trying the authoritative movement control but after reading the tutorial I can’t reproduce it ><
I tried a lot of things but in the last I seen that on a
public class PlayerBehaviour : Bolt.EntityEventListener
WHen I put the method
public override void ExecuteCommand(Bolt.Command command, bool resetState){
UnityEngine.Debug.Log("COME HERE ?”);
}
I have nothing in the console.
You know where I have wrong ? You have tips about where I can look for it ?
Thank you.
PS : I'm using Unity 5.2.2f1 and Bolt Beta-v0.4.3.8
I’m trying the authoritative movement control but after reading the tutorial I can’t reproduce it ><
I tried a lot of things but in the last I seen that on a
public class PlayerBehaviour : Bolt.EntityEventListener
WHen I put the method
public override void ExecuteCommand(Bolt.Command command, bool resetState){
UnityEngine.Debug.Log("COME HERE ?”);
}
I have nothing in the console.
You know where I have wrong ? You have tips about where I can look for it ?
Thank you.
PS : I'm using Unity 5.2.2f1 and Bolt Beta-v0.4.3.8
0
Comments
-
Are you queueing the command in simulatecontroller?
public override void SimulateController() { var input = PlayerCommand.Create(); input.Forward = forward; input.Backward = backward; input.Left = left; input.Right = right; entity.QueueInput(input); }
0 -
Hi,
Thanks for the answer but don't resolve the problem.
I was thinking that was my script and I try the empty script include in this recent post http://forum.photonengine.com/discussion/6869/simulatecontroller-and-executecommand-example
The script is empty, I set the "PlayerCommand" with the same input and if I just insert a debug log in the executeCommand function, it's not call.
You know another tips ?0 -
On your prefab is Controller Prediction checked on?0
-
Yes, on the prefab, the toggle "controller Predicted Movement" is on.
If that can help, when I compile Bolt, I have a Mono error :
"Mono.CompilerServices.SymbolWriter.MonoSymbolFileException: Symbol file `/Users/ljosselin/Documents/Projects/Perso/Mania/ManiaUnity/Assets/bolt/assemblies/bolt.user.dll.mdb' does not match assembly
at... (very long mesage)"
but the compilator write : "BoltCompiler: Success!"
I try asap on a windows pc.0 -
Delete the mdb file0
-
With the mdb file delete, I've fixed the compiler problem but the ExecuteCommand problem still alive ><
I try another new project today.
EDIT:
OK, I tried the sample on my project and it works.
With 100%, I forget one things but I didn't find it. I continue to looking for.0 -
OK, I did it !
The object that I control (character in this case) must be "in control" by the player.
It's probably wrong but I've writing in the method Attached of the player's main script :if (entity.isOwner) entity.TakeControl();
And that's work.1 -
Had the exact same problem and this fixed it. I would like to know if this is wrong to do and if there is a "right" way to set the controller of an entity.0
-
Player.cs in the tutorial has a good example of this0