setPosition

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
etcaptor
Posts: 871
Joined: Fri Apr 09, 2004 10:32 pm
Location: Valhalla
Contact:

setPosition

Post 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.
keless
Posts: 805
Joined: Mon Dec 15, 2003 10:37 pm
Location: Los Angeles, California, USA

Post 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.
a screen cap is worth 0x100000 DWORDS
etcaptor
Posts: 871
Joined: Fri Apr 09, 2004 10:32 pm
Location: Valhalla
Contact:

Post 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.
Domarius
Posts: 178
Joined: Thu Mar 11, 2004 9:51 am
Location: Brisbane, QLD, Australia

Post 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.
etcaptor
Posts: 871
Joined: Fri Apr 09, 2004 10:32 pm
Location: Valhalla
Contact:

Post 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.
Guest

Post by Guest »

its in the HowTo section, 13th one down, called "Class to read additional informations from Quake3 .bsp Files "
Unarekin
Posts: 60
Joined: Thu Apr 22, 2004 11:02 pm

Post 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).
etcaptor
Posts: 871
Joined: Fri Apr 09, 2004 10:32 pm
Location: Valhalla
Contact:

Post 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.
Post Reply