BulletSim: fixing problems with llMoveToTarget. Not all fixed yet.

This commit is contained in:
Robert Adams
2013-04-09 17:53:18 -07:00
parent b53713cdda
commit 5f2cbfc0fd
3 changed files with 18 additions and 6 deletions

View File

@@ -295,6 +295,7 @@ public abstract class BSPhysObject : PhysicsActor
if (PhysicalActors.TryGetActor(actorName, out theActor))
{
// The actor already exists so just turn it on or off
DetailLog("{0},BSPhysObject.EnableActor,enablingExistingActor,name={1},enable={2}", LocalID, actorName, enableActor);
theActor.Enabled = enableActor;
}
else
@@ -302,10 +303,15 @@ public abstract class BSPhysObject : PhysicsActor
// The actor does not exist. If it should, create it.
if (enableActor)
{
DetailLog("{0},BSPhysObject.EnableActor,creatingActor,name={1}", LocalID, actorName);
theActor = creator();
PhysicalActors.Add(actorName, theActor);
theActor.Enabled = true;
}
else
{
DetailLog("{0},BSPhysObject.EnableActor,notCreatingActorSinceNotEnabled,name={1}", LocalID, actorName);
}
}
}
}