Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / Possible BUG in 2.0.22 in Mesh manipulation SetMeshMemblockVertexPosition or SetObjectMeshFromMemblock

Author
Message
Harlequin
14
Years of Service
User Offline
Joined: 22nd Mar 2010
Location: Melbourne (AU)
Posted: 4th Jan 2017 13:37
So I have the attached code, all files in zip file to include the OBJ file as it only happens with OBJ files

The bug is that if I create a simple plane via the inbuilt function "CreateObjectPlane" and place another object on it, I can manipulate the vertexes on the plane with no impact to the object created just before I manipulate the terrain object.
HOWEVER If I load an externally created plane obj file (tried Blender, Milkshape3D and Wings3D) and place another object on it and then manipulate the vertexes on the plane then the object created immediately after the OBJ was loaded gets it's vertexes changed.
In the example code below I load the plane object, create a tree (trunk then top) and then manipulate the vertex height via Mesh commands. The effect is that top of the tree gets messed up, but to add extra weirdness, I am not actually changing the vertexes (I just load them the save them back over the top).

The work around is as follows.
Create an dummy object (eg: a cube) just before manipulating the vertexes
OR
Load the object and manipulate the vertexes before creating/loading the next objects.

This looks very much like a bug, but I am happy to be wrong... and it could be my code..
It\'s late, I\'m tired, out of coffee and now I\'m wet.

Attachments

Login to view attachments
Paul Johnston
TGC Developer
21
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 5th Jan 2017 16:41
Thanks, that would have taken ages to track down without your example. Fixed for the next version.
Harlequin
14
Years of Service
User Offline
Joined: 22nd Mar 2010
Location: Melbourne (AU)
Posted: 5th Jan 2017 21:13
Cool glad it was of help.

Speaking of meshes can we going to get the Description field for "CreateMemblockFromObjectMesh" updated to something more useful than "documented above "?
I know what it does, it just might be helpful for the newer users.
It\'s late, I\'m tired, out of coffee and now I\'m wet.
Paul Johnston
TGC Developer
21
Years of Service
User Offline
Joined: 16th Nov 2002
Location: United Kingdom
Posted: 5th Jan 2017 21:25
I didn't realise it had done that, as you can see there are two versions of that command, one takes an extra parameter, so I documented one and then put "documented above" for the other to avoid inconsistencies. Turns out the help system chose the shorter of the two descriptions, should be fixed for the next version.

Login to post a reply

Server time is: 2024-09-29 21:15:29
Your offset time is: 2024-09-29 21:15:29