Change the primflags to Temporary and Phantom
parent
3ce758d96a
commit
cf4aeac0e5
|
@ -93,14 +93,17 @@ namespace Flocking
|
||||||
SceneObjectGroup group = findByName (m_birdPrim);
|
SceneObjectGroup group = findByName (m_birdPrim);
|
||||||
sog = CopyPrim (group, bird.Id);
|
sog = CopyPrim (group, bird.Id);
|
||||||
rootPart = sog.RootPart;
|
rootPart = sog.RootPart;
|
||||||
|
rootPart.AddFlag(PrimFlags.Temporary);
|
||||||
|
rootPart.AddFlag(PrimFlags.Phantom);
|
||||||
//set prim to phantom
|
//set prim to phantom
|
||||||
sog.UpdatePrimFlags(rootPart.LocalId, false, false, true, false);
|
//sog.UpdatePrimFlags(rootPart.LocalId, false, false, true, false);
|
||||||
m_sogMap [bird.Id] = sog;
|
m_sogMap [bird.Id] = sog;
|
||||||
m_scene.AddNewSceneObject (sog, false);
|
m_scene.AddNewSceneObject (sog, false);
|
||||||
// Fire script on_rez
|
// Fire script on_rez
|
||||||
sog.CreateScriptInstances(0, true, m_scene.DefaultScriptEngine, 1);
|
sog.CreateScriptInstances(0, true, m_scene.DefaultScriptEngine, 1);
|
||||||
rootPart.ParentGroup.ResumeScripts();
|
rootPart.ParentGroup.ResumeScripts();
|
||||||
rootPart.ScheduleFullUpdate();
|
rootPart.ScheduleFullUpdate();
|
||||||
|
sog.DetachFromBackup();
|
||||||
} else {
|
} else {
|
||||||
sog = existing.ParentGroup;
|
sog = existing.ParentGroup;
|
||||||
m_sogMap[bird.Id] = sog;
|
m_sogMap[bird.Id] = sog;
|
||||||
|
|
Loading…
Reference in New Issue