Page 1 of 1

setPosition

Posted: Thu May 06, 2004 4:10 pm
by etcaptor
setPosition
When I trying to test collision demo with another quake3 maps, my player is falling down and I cannot see any part of map.
I note that in examples the follow code was used:


code:
--------------------------------------------------------------------------------
sceneNode->setPosition(core::vector3df(-1300,-144,-1249));
--------------------------------------------------------------------------------




Is very hard to guess these values for another maps.
Is there any method to place player at beginning of map?

Quake 3 map elements /PlayerStart/ are not supported in Irrlicht, right?
Please some help and code if anybody knows.
Thanks in advance.

Posted: Thu May 06, 2004 5:31 pm
by keless
there was someone else who had a Q3BSP entity parser-- you should search the forums and use that to read the start positions from your .bsp, and use that as the location to spawn your avatars.

Posted: Thu May 06, 2004 8:28 pm
by etcaptor
Thanks for reply keless,

Sorry, but I cannot found any issue about my problem in forum. Can you to show any link?
Thanks in advance.

Posted: Fri May 07, 2004 2:45 am
by Domarius
If the example works with the map that comes with Irrlicht, and doesn't work with your maps, then there must be something about your maps that it doesn't like. You're probably better off solving this problem at the map level, rather than trying to compensate with programming.

You should look into the differences between your map and the one that comes with Irrlicht. Specifically, what program was used to create it.

Posted: Fri May 07, 2004 2:55 am
by etcaptor
Thanks for reply Domarius,
I use QUARK for map creating.
When I change values of
sceneNode->setPosition(core::vector3df(-1300,-144,-1249));
with original irrlicht map, I get equal result.

Posted: Fri May 07, 2004 3:05 am
by Guest
its in the HowTo section, 13th one down, called "Class to read additional informations from Quake3 .bsp Files "

Posted: Fri May 07, 2004 3:19 am
by Unarekin
Anonymous wrote:its in the HowTo section, 13th one down, called "Class to read additional informations from Quake3 .bsp Files "
The links in that thread are defunct, and I was unable to find the class by browsing the site. ;)

That being said, have you tried commenting out the setPosition? That particular line is there because the map wasn't built around the origin (0,0,0).

Posted: Fri May 07, 2004 10:13 pm
by etcaptor
OK.
The problem was solved.
When I use bsptree directly /not pk3 file/, irrlicht is searching texture files in subdir of my demo /not in subdir of media dir/
I have copy these textures on correct place, and all was ok.

QUARK works very well with quake 3 bsp tree, and I hope, that soon q3bsptree additional information reading will be realized in irrlicht.
By the way I Unarekin was right.
I have removed (-1300,-144,-1249) values for my new map.