EntityX/Y/X bug

BlitzMax Forums/MiniB3D Module/EntityX/Y/X bug

Jaydubeww(Posted 2016) [#1]
I'm trying to get a mesh's child x/y/z position but EntityX(true) and Entity(false) returns the same value. Does the global parameter not work? Any way around this?

Thanks


RustyKristi(Posted 2016) [#2]
I think somebody posted a similar problem, how about in openb3d?


Jaydubeww(Posted 2016) [#3]
I would try openb3d, but I'm having some difficulties getting it to work. When Blide builds the mod, it always fails on all except openb3dstd. What am I doing wrong? I haven't used bmax in a while..


RustyKristi(Posted 2016) [#4]
Ok I see. The current version of OpenB3D is broken so you need to get the working version.

Here's the download link:

https://github.com/markcwm/openb3d.mod/archive/f152c0280812508814e7bf81f336eacf7d9b65cd.zip

That should now work now.

I can't check for minib3d as I don't fully used or tested it but both version has pros and cons.


Kryzon(Posted 2016) [#5]
It has to do with what origin to get the coordinates relative to.
When you specify True, for "global" mode, the origin considered is that of the world. This is called world-space.
When you specify False, for "local" mode, the origin considered is that of the parent entity. The coordinates of the entity will be given relative to its parent (how far the entity is located or rotated from its parent).

If the entity does not have a parent or if that parent is positioned and aligned perfectly with the world origin then the global and local modes will give the same coordinates.


Jaydubeww(Posted 2016) [#6]
Rusty,
Thank you, but I'm still having trouble getting it to build. The mod is definitely in the right folder, as shown here. Here are the errors.
►openb3d.b3dglgraphics was scheduled to next iteration
Compile Error: Can't find interface for module 'openb3d.openb3dex'
[e:/BlitzMax/mod/openb3d.mod/b3dglgraphics.mod/b3dglgraphics.bmx;36;1]
Build Error: failed to compile e:/BlitzMax/mod/openb3d.mod/b3dglgraphics.mod/b3dglgraphics.bmx
►openb3d.b3dsound was scheduled to next iteration
Compile Error: Can't find interface for module 'openb3d.openb3dex'
[e:/BlitzMax/mod/openb3d.mod/b3dsound.mod/b3dsound.bmx;43;1]
Build Error: failed to compile e:/BlitzMax/mod/openb3d.mod/b3dsound.mod/b3dsound.bmx
►openb3d.openb3d was scheduled to next iteration
Compile Error: Can't find interface for module 'openb3d.openb3dlib'
[e:/BlitzMax/mod/openb3d.mod/openb3d.mod/openb3d.bmx;36;1]
Build Error: failed to compile e:/BlitzMax/mod/openb3d.mod/openb3d.mod/openb3d.bmx
►openb3d.openb3dex was scheduled to next iteration
Compile Error: Can't find interface for module 'openb3d.openb3dlib'
[e:/BlitzMax/mod/openb3d.mod/openb3dex.mod/openb3dex.bmx;36;1]
Build Error: failed to compile e:/BlitzMax/mod/openb3d.mod/openb3dex.mod/openb3dex.bmx
►openb3d.openb3dlib was scheduled to next iteration
e:/BlitzMax/mod/openb3d.mod/openb3dlib.mod/openb3d/src/3ds.cpp: In function `void load3ds::ReadTriMesh()':
e:/BlitzMax/mod/openb3d.mod/openb3dlib.mod/openb3d/src/3ds.cpp:237: error: no match for 'operator!=' in 'it != std::list<_Tp, _Alloc>::rend() [with _Tp = int, _Alloc = std::allocator<int>]()'
e:/BlitzMax/mod/openb3d.mod/openb3dlib.mod/openb3d/src/3ds.cpp: In function `Mesh* load3ds::Load3ds(std::string, Entity*)':
e:/BlitzMax/mod/openb3d.mod/openb3dlib.mod/openb3d/src/3ds.cpp:382: error: no match for 'operator!=' in 'it != std::list<_Tp, _Alloc>::rend() [with _Tp = int, _Alloc = std::allocator<int>]()'
Build Error: failed to compile e:/BlitzMax/mod/openb3d.mod/openb3dlib.mod/openb3d/src/3ds.cpp
&#9658;&#9658;&#9658;&#9658;openb3d.b3dglgraphics was not built. See error information on latest attempt.
&#9658;&#9658;&#9658;&#9658;openb3d.b3dsound was not built. See error information on latest attempt.
&#9658;&#9658;&#9658;&#9658;openb3d.openb3d was not built. See error information on latest attempt.
&#9658;&#9658;&#9658;&#9658;openb3d.openb3dex was not built. See error information on latest attempt.
&#9658;&#9658;&#9658;&#9658;openb3d.openb3dlib was not built. See error information on latest attempt.


Kryzon,
Yes, that's how it should work. But I'm getting the same values for global and local. The child is not at the origin and it does have a parent.


RustyKristi(Posted 2016) [#7]
By looking at your errors, it looks like it has existing .bmx files there. Try a clean folder install. Do not do overwrite. You can keep a backup of your previous copy and move it away just to be sure.


Jaydubeww(Posted 2016) [#8]
I did a clean install of bmx and I still receive the same errors.


RustyKristi(Posted 2016) [#9]
Ok try this build. If you are familiar with Git commit history, you can always go back one commit at a time.

I think this now works

Download:
https://github.com/markcwm/openb3d.mod/archive/ee46c00923ff33f3b132876e28f8b69527ad3580.zip

This is "Forgot TTexture" commit 3 months ago.

https://github.com/markcwm/openb3d.mod/commit/ee46c00923ff33f3b132876e28f8b69527ad3580

For comparison, I'm using Vanilla BMX 1.5 with MinGW 4.8.1


Jaydubeww(Posted 2016) [#10]
Finally got it to build. Had to reinstall mingw. I don't remember what version it was, but I got Nuwems MinGW 4.6.1 from this post:
http://www.blitzmax.com/Community/posts.php?topic=96946


Jaydubeww(Posted 2016) [#11]
Well, the global argument seems to work. I'm not sure if the local one does considering GetChild method does not work properly as this was discussed last week:

http://www.blitzbasic.com/Community/posts.php?topic=106665


RustyKristi(Posted 2016) [#12]
That's great. It really depends on your requirement so I'm not saying you give up on either one of them. I got a personal openb3d project that does not need those commands so obviously I have not found any issue.