Photon mirroring animation?
Options
Hi, my photon app working fine, but 1 slice of code have a bug:
void Update() {
if (Input.GetKeyDown (KeyCode.R)) {
reload ();
}
if (rb.velocity.magnitude >= 0.5 && !graphicsAM.IsPlaying(tpRunReload.name)) {
if (!isTP) {
playAnim (walk.name);
} else {
graphicsPV.RPC ("playAnimPV", PhotonTargets.All, tpRun.name);
}
} else {
if (!graphicsAM.IsPlaying (tpReload.name)) {
if (!isTP) {
playAnim (iddle.name);
} else {
graphicsPV.RPC ("playAnimPV", PhotonTargets.All, tpIddle.name);
}
}
}
}
++++
Reload working for all players (myself and OTHERS players reloading with me). How to solve this?
RPC call is here (+ anim method):
public void reload() {
graphicsPV.RPC ("playAnimPV", PhotonTargets.All, tpReload.name);
}
[PunRPC]
public void playAnimPV (string animName) {
if (isTP) {
graphicsAM.CrossFade (animName);
}
}
All anims working fine, but reload apply reload for all players (not ONLY myself, others players reloading with me same 1 touch over R key (on my game). How to solve this? Try isMine but cant work.
Thanks!
void Update() {
if (Input.GetKeyDown (KeyCode.R)) {
reload ();
}
if (rb.velocity.magnitude >= 0.5 && !graphicsAM.IsPlaying(tpRunReload.name)) {
if (!isTP) {
playAnim (walk.name);
} else {
graphicsPV.RPC ("playAnimPV", PhotonTargets.All, tpRun.name);
}
} else {
if (!graphicsAM.IsPlaying (tpReload.name)) {
if (!isTP) {
playAnim (iddle.name);
} else {
graphicsPV.RPC ("playAnimPV", PhotonTargets.All, tpIddle.name);
}
}
}
}
++++
Reload working for all players (myself and OTHERS players reloading with me). How to solve this?
RPC call is here (+ anim method):
public void reload() {
graphicsPV.RPC ("playAnimPV", PhotonTargets.All, tpReload.name);
}
[PunRPC]
public void playAnimPV (string animName) {
if (isTP) {
graphicsAM.CrossFade (animName);
}
}
All anims working fine, but reload apply reload for all players (not ONLY myself, others players reloading with me same 1 touch over R key (on my game). How to solve this? Try isMine but cant work.
Thanks!
0
Comments
-
I solved this.
Photon cant fully work with legacy anims in Unity (legacy).
Use the new approach to anims and will work fine0 -
I am using legacy animation system and everything works perfectly.
0 -
Nop , this tool cant work with full resources with Unity legacy anim (2017+), 1 year working hard and changing code and loss all project (massive anims).
ReWorking with mecanim and full supported .-1 -
Cant work (unity 2017+). Working with animator .-1
-