collision with .irr maps
collision with .irr maps
Hi everyone I know that there is an example for collision in q3 maps but im not sure how to port this for an Irr map.
-
- Admin
- Posts: 3590
- Joined: Mon Oct 09, 2006 9:36 am
- Location: Scotland - gonnae no slag aff mah Engleesh
- Contact:
I profess ignorance of all thing IrrEdit, but it strikes me as a very good idea to add an .irr to the sample media and to at least one of the example projects. Does anyone who uses IrrEdit fancy doing that?
Please upload candidate patches to the tracker.
Need help now? IRC to #irrlicht on irc.freenode.net
How To Ask Questions The Smart Way
Need help now? IRC to #irrlicht on irc.freenode.net
How To Ask Questions The Smart Way
-
- Admin
- Posts: 3590
- Joined: Mon Oct 09, 2006 9:36 am
- Location: Scotland - gonnae no slag aff mah Engleesh
- Contact:
Oh, the cunningly titled "LoadIrrFile" example. I guess that demonstrates that not only do I not use IrrEdit, that I have some sort of hysterical blindness regarding it.
Please upload candidate patches to the tracker.
Need help now? IRC to #irrlicht on irc.freenode.net
How To Ask Questions The Smart Way
Need help now? IRC to #irrlicht on irc.freenode.net
How To Ask Questions The Smart Way
Check out the wiki at "http://www.irrlicht3d.org/wiki/index.ph ... gCollision" That has everything you need =), there is an error in the code, he uses "and" instead of "&&"
-
- Admin
- Posts: 3590
- Joined: Mon Oct 09, 2006 9:36 am
- Location: Scotland - gonnae no slag aff mah Engleesh
- Contact:
Um... which C/C++ compilers treat 'and' as a keyword?hybrid wrote:That's not an error, it's just another keyword which can be used in place of &&. However, it's less known to C/C++ programmers.
Last edited by rogerborg on Fri Nov 16, 2007 6:24 pm, edited 1 time in total.
Please upload candidate patches to the tracker.
Need help now? IRC to #irrlicht on irc.freenode.net
How To Ask Questions The Smart Way
Need help now? IRC to #irrlicht on irc.freenode.net
How To Ask Questions The Smart Way
Yes, these alternative tokens are indeed part of the C++ standard. Unfortunately the Microsoft compiler disables the functionality as an extension that is enabled by default.
If you compile with /Za to disable extensions or include iso646.h the alternative tokens work fine. You should not be required to include the header, but the Microsoft compiler uses this to allow them to disable the extension by default and still provide a way for users to have access to the language feature.
Here is the compile result [msvc7.1]
Here are links to the MSDN docs on the subject of extensions...
msvc71
msvc80
Travis
If you compile with /Za to disable extensions or include iso646.h the alternative tokens work fine. You should not be required to include the header, but the Microsoft compiler uses this to allow them to disable the extension by default and still provide a way for users to have access to the language feature.
Here is the compile result [msvc7.1]
Code: Select all
C:\Documents and Settings\tvitek>type u.cpp
int main ()
{
return 1 and 3;
}
C:\Documents and Settings\tvitek>cl /nologo t.cpp
t.cpp
t.cpp(218) : error C2146: syntax error : missing ';' before identifier 'and'
t.cpp(218) : error C2065: 'and' : undeclared identifier
t.cpp(218) : error C2143: syntax error : missing ';' before 'constant'
C:\Documents and Settings\tvitek>cl /nologo /Za t.cpp
t.cpp
C:\Documents and Settings\tvitek>
msvc71
msvc80
Travis
-
- Admin
- Posts: 3590
- Joined: Mon Oct 09, 2006 9:36 am
- Location: Scotland - gonnae no slag aff mah Engleesh
- Contact:
Well, you live and learn. Thanks for the references, chaps. I guess I'm just an old fashioned C Luddite at heart.
Please upload candidate patches to the tracker.
Need help now? IRC to #irrlicht on irc.freenode.net
How To Ask Questions The Smart Way
Need help now? IRC to #irrlicht on irc.freenode.net
How To Ask Questions The Smart Way
-
- Posts: 1638
- Joined: Mon Apr 30, 2007 3:24 am
- Location: Montreal, CANADA
- Contact:
Hi. Not sure you have been answered. For quick response.
1. You will have to load your level as an OCCTREE in IRREDIT
2. Take this snippet code (working with IRRlicht 1.2 and 1.3.1)
http://irrlicht.sourceforge.net/phpBB2/ ... hp?t=23707
This snippet was created mostly by things learned from Vitek(Travis). I'm using it to load all my levels and apply collision to the environnement. The only thing that is neccessary is that you load your mesh as an OCCTREE in IRRedit (The snippet will search the scene graph and put all the OCCTREE in selector, add them to the metaselector that will be used in the collisionResponseAnimator for the camera).
1. You will have to load your level as an OCCTREE in IRREDIT
2. Take this snippet code (working with IRRlicht 1.2 and 1.3.1)
http://irrlicht.sourceforge.net/phpBB2/ ... hp?t=23707
This snippet was created mostly by things learned from Vitek(Travis). I'm using it to load all my levels and apply collision to the environnement. The only thing that is neccessary is that you load your mesh as an OCCTREE in IRRedit (The snippet will search the scene graph and put all the OCCTREE in selector, add them to the metaselector that will be used in the collisionResponseAnimator for the camera).