ExecuteCommand vs SimulateController
Options
Ruslan
✭
Which way should I choose?
I have a simple code to create arrows, sample code here; http://forum.photonengine.com/discussion/9923/executecommand-is-it-possible-to-organize-any-additional-checks-so-that-the-method-works-correctly#latest
And in the first and second methods, the code works in different ways, and in the wallpaper cases wrong! If I use ExecuteCommand the client creates several arrows instead of one, If I use SimulateController everything works fine, but then do not work another method that I use as an auto sight. If I use a shooting method SimulateController Bolt ignores the calculation of the position of the LookAt () method
I have a simple code to create arrows, sample code here; http://forum.photonengine.com/discussion/9923/executecommand-is-it-possible-to-organize-any-additional-checks-so-that-the-method-works-correctly#latest
And in the first and second methods, the code works in different ways, and in the wallpaper cases wrong! If I use ExecuteCommand the client creates several arrows instead of one, If I use SimulateController everything works fine, but then do not work another method that I use as an auto sight. If I use a shooting method SimulateController Bolt ignores the calculation of the position of the LookAt () method
//auto sight method void AvtoAim(){ var players = FindObjectsOfType<AvtoAim> (); foreach (var player in players) { if (player != this) { if (Vector3.Distance (transform.position, player.transform.position) > 4) { Transform target = player.transform; transform.LookAt (target); } } } }Which way should I choose, for creating arrows with components of a collider and rigid body, for this to work correctly?
0
Comments
-
They should be used in conjunction with each other. Follow the tutorial to understand how auth controllers work https://doc.photonengine.com/en-us/bolt/current/advanced-tutorials/chapter-10
-
Thank you, I did so in method SimulateController I add bool variable and in method ExecuteCommand I added a verificationstanchion said:They should be used in conjunction with each other. Follow the tutorial to understand how auth controllers work https://doc.photonengine.com/en-us/bolt/current/advanced-tutorials/chapter-1
And now everything works0