Wintermute Engine Forum

Wintermute Engine => Technical forum => Topic started by: Jose on November 25, 2011, 06:55:26 AM

Title: RemoveAttachment on entities
Post by: Jose on November 25, 2011, 06:55:26 AM
Hi all,

I've a problem with the RemoveAttachment method of an entity. I'm trying to use this method to remove a previous attached entity but the method always return false. Here is the code I use to attach one entity (lupa) to another entity (streetlights):

Code: [Select]
var ent = this.GetFreeNode("streetlights");
ent.AddAttachment("lupa.entity", false, -64, -243);

And here is the code I use to try to detach the entity previously attached (lupa) from the other entity (streetlights):

Code: [Select]
                ent.RemoveAttachment(0);

But I always get false as return of the method RemoveAttachment and the attached entity remains attached and visible (unless I set its Active property to false, then the entity remains attached but not visible).

Any ideas?

Thanks in advance!

Best,

Jose