BSP getasvector3df does not respect setscale
BSP getasvector3df does not respect setscale
If the BSP mesh is scaled by some amount, getAsVector3df should get scaled by the same amount to get correct numbers.
-
- Admin
- Posts: 14143
- Joined: Wed Apr 19, 2006 9:20 pm
- Location: Oldenburg(Oldb), Germany
- Contact:
Re: BSP getasvector3df does not respect setscale
Where does this method belong to? It's not part of the common API for all nodes, is it?
Re: BSP getasvector3df does not respect setscale
It's a BSP specific method, yes. But for a scaled/ rotated/ moved model, one would expect the entities in it to have moved accordingly.
-
- Admin
- Posts: 14143
- Joined: Wed Apr 19, 2006 9:20 pm
- Location: Oldenburg(Oldb), Germany
- Contact:
Re: BSP getasvector3df does not respect setscale
If you meant irr::scene::quake3::getAsVector3df then the answer is no. This simply is a helper function to convert right-handed to left-handed coords (which even does not behave like the specs in the API documentation, but that's yet another question). There's no scale to take into account, it's a simple static function without any relation to matrices.
Re: BSP getasvector3df does not respect setscale
The point is that it should, that's what the user would expect.
If a spawn point is at 0,0,0, but the level is moved to 1000,1000,1000, putting the camera at the spawn point coords would be wrong. Since that function is used to get the position of an entity, it's the right place to do the relative transform IMHO.
If a spawn point is at 0,0,0, but the level is moved to 1000,1000,1000, putting the camera at the spawn point coords would be wrong. Since that function is used to get the position of an entity, it's the right place to do the relative transform IMHO.
-
- Admin
- Posts: 14143
- Joined: Wed Apr 19, 2006 9:20 pm
- Location: Oldenburg(Oldb), Germany
- Contact:
Re: BSP getasvector3df does not respect setscale
Oh, I think I got the intention of the method's parameters wrong. So the string really just contains a name, not the vector represented in printed characters? Anyway, we're talking here about the mesh, not the scene node, don't we? We'd need to get the methods from the q3 scene node to get a proper scaled value. Can you show me some full code which reproduces this problem?
Re: BSP getasvector3df does not respect setscale
Yes, example 16 with one line added:
Code: Select all
--- main.cpp 2010-10-24 09:43:06.000000000 +0300
+++ gg.cpp 2011-10-24 15:40:20.000000000 +0300
@@ -195,6 +195,8 @@
node = smgr->addOctreeSceneNode(geometry, 0, -1, 4096);
}
+ node->setPosition(core::vector3df(1000,1000,1000));
+
// create an event receiver for making screenshots
CScreenShotFactory screenshotFactory(device, mapname, node);
device->setEventReceiver(&screenshotFactory);