OgreNewt::body problem

danharibo

26-03-2006 16:20:08

EDIT SOLVED, I HADNENT MADE THE coll :oops:

is this code correct:
OgreNewt::Body *head = new OgreNewt::Body(mWorld,OgreNewt::Collision(mWorld),0);
if so why is it causeing this :
------ Build started: Project: dropshipdemo, Configuration: Debug Win32 ------
Compiling...
dropshipdemo.cpp
c:\ogrenewt\ogrenewt_main\inc\ogrenewt_debugger.h(67) : warning C4067: unexpected tokens following preprocessor directive - expected a newline
c:\documents and settings\pro.com\my documents\visual studio 2005\projects\dropshipdemo\dropshipdemo\include\dropshipdemo.h(90) : error C2664: 'OgreNewt::Body::Body(const OgreNewt::World *,const OgreNewt::Collision *,int)' : cannot convert parameter 2 from 'OgreNewt::Collision' to 'const OgreNewt::Collision *'
No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called
Build log was saved at "file://c:\Documents and Settings\pro.com\My Documents\Visual Studio 2005\Projects\dropshipdemo\dropshipdemo\obj\Debug\BuildLog.htm"
dropshipdemo - 1 error(s), 1 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

abhinavxrai

27-03-2006 07:59:49

So the problem is solved then? Yes the collision primitive has to be created along with the physical body. It makes sense when understanding the way Newton and OgreNewt work!