Calimaw Posted May 2, 2010 Share Posted May 2, 2010 Where can I find an entities key name? For example the atmosphere entity does have a key with the name of "name" describing the name it was given in the editor, but I'm unable to discover the rest of its keys in order to use them in building a scene. Quote Link to comment Share on other sites More sharing options...
Calimaw Posted May 2, 2010 Author Share Posted May 2, 2010 I have another strange problem as well; Vector3 waterPos = myScene.GetChild("waterplane_1").Position; Framework.Effects.Water.Height = waterPos.Y; Fluid.SetPlane(new Vector4(0, 1, 0, waterPos.Y), 0.0f); Is this not a correct way to set the fluid plane? My mesh which is parented to a physics box of 1, 1, 1 floats under the water, not near the top. Also, I keep getting an error when trying to use myMesh.Scale = new Vector3(1, 1, 1); just to make sure the visual mesh is the same as the body mesh. The error it throws is: A call to PInvoke function 'Leadwerks!Leadwerks.Core::ScaleEntity' has unbalanced the stack. This is likely because the managed PInvoke signature does not match the unmanaged target signature. Check that the calling convention and parameters of the PInvoke signature match the target unmanaged signature. in Entity.cs Core.ScaleEntity(this.Pointer, value.ToFloatArray(), 0); Quote Link to comment Share on other sites More sharing options...
ZioRed Posted May 3, 2010 Share Posted May 3, 2010 Well I noticed that ScaleEntity in the engine DLL is declared: ScaleEntity(TEntity entity, const Vec3 &scale) Then the problem seems again the wrapping: Entity.cs should be updated changing: Core.ScaleEntity(this.Pointer, value.ToFloatArray(), 0); to: Core.ScaleEntity(this.Pointer, value.ToFloatArray()); Quote ?? FRANCESCO CROCETTI ?? http://skaredcreations.com Link to comment Share on other sites More sharing options...
Masterxilo Posted May 4, 2010 Share Posted May 4, 2010 Where can I find an entities key name? For example the atmosphere entity does have a key with the name of "name" describing the name it was given in the editor, but I'm unable to discover the rest of its keys in order to use them in building a scene. Any text string can be a "key" for Set/GetEntityKey. There are just special keys which already have a reaction coded in the base class script. See 'class.lua'. Quote Hurricane-Eye Entertainment - Site, blog. Link to comment Share on other sites More sharing options...
Calimaw Posted May 5, 2010 Author Share Posted May 5, 2010 Thanks, I was looking for precisely that, Masterxilo! I'm going to be using CPP and LEO, as I can't easily remedy problems Im having with the C# wrapper since I'm a noob Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.