Jump to content

Entity Key Values?


Calimaw
 Share

Recommended Posts

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.

Link to comment
Share on other sites

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);

Link to comment
Share on other sites

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());

?? FRANCESCO CROCETTI ??

http://skaredcreations.com

Link to comment
Share on other sites

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'.

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...