item becomes invibile/visible after 10 secs a
I've fot an weird error that item of Type (Avatar) becomes invisible after about 10 secs and comes back to visible and vice versa.. I am very sure that they're in the scene and i don't even move the item.. It just causing this kind of problems from the same position..
0
Comments
-
Visible and invisible is not handled by Photon, I think. If that's something you send as events, please check if an "invisible" event is actually received or how else it vanishes.
I fear we can't help here, aside from general guidance.0 -
Thanks.. I am pretty sure that I am not sending any events. The code below is the one that I attach to the avatar
if (Time.time > this.nextMoveTime)
{
if (this.lastMovePosition != this.transform.position)
{
this.engine.Avatar.MoveAbsolute(GetPosition(this.transform.position));
}
}
and the code below is how I am receiving it back again
if (actor == null || actor.IsVisible == false)
{
if (actor.IsVisible == false)
{
print("Actor Not Visible");
}
else
{
print("Actor NULL");
}
ShowActor(false);
return;
}
Vector3 newPos = this.GetPosition(this.actor.Position);
//Vector3 newRot = this.GetRotation(this.actor.Rotation);
if (newPos != this.lastMoveUpdate)
{
this.lastMoveUpdate = newPos;
this.lastMoveUpdateTime = Time.time;
}
if (this.ShowActor(true))
{
// newly displayed
this.transform.position = newPos;
}
else if (newPos != this.transform.position)
{
// move smoothly
float lerpT = (Time.time - lastMoveUpdateTime) / 0.05f;
Vector3 newTransformPos = Vector3.Lerp(transform.position, newPos, lerpT);
newTransformPos.y = 0.0f;
this.transform.position = newTransformPos;
print(newTransformPos);
}
It's the same concept as the Actor from the Island Demo and I just strip out creating of text mesh0 -
So the question is still how do items become invisible and why.0
-
Yes... actor.IsVisible becomes true even I am not moving my players and they're seeing each other in a close distance0
-
please apply the following fix: viewtopic.php?f=5&t=397&p=1918#p19180