irrBP - An Irrlicht - Bullet Physics Wrapper

Announce new projects or updates of Irrlicht Engine related tools, games, and applications.
Also check the Wiki
nyfinscyf
Posts: 1
Joined: Sun Jun 05, 2011 2:11 pm

Character Controller

Post by nyfinscyf »

Hey everyone,

I've noticed on the IrrBp homepage it lists a few things that have been completed:

Wrapper Status: 75%

Rigid Bodies
Basic Soft Bodies
Constraints
Animators
Character Controllers
Multithread (BETA)

The character controller is what I need the most at the moment, however, I cannot seem to find an implementation for it anywhere in IrrBp.

If anyone has any help with this, or alternative ways to implement a character I will greatly appreciate it.

Thanks,
Nyfinscyf
spacetime
Posts: 15
Joined: Mon Feb 14, 2011 12:24 am

Compiling Example with SVN

Post by spacetime »

Hi, back again and need some help.
Downloaded latest SVN and compiled. Had some problems but solved it.
When compiling the example compiler error:
irrVectorToBulletVector was not declared in this scope - solved by adding

Code: Select all

#include "convert.h"
using namespace bullet

in IrrBP.h
Added libBulletMultiThreaded.a in front of Bullet libraries to solve a bunch of undefined reference errors
Now linker complaining about two errors, both are the same:
CIrrBPCamera.cpp|65|undefined reference to `CSceneNodeAnimatorCameraFPS::CSceneNodeAnimatorCameraFPS(CIrrBPRigidBody*, irr::gui::ICursorControl*, float, float, float, irr::SKeyMap*, unsigned int, bool, bool)'
Any ideas
THX
spacetime
Posts: 15
Joined: Mon Feb 14, 2011 12:24 am

Post by spacetime »

bump !
anyone ? any ideas
spacetime
Posts: 15
Joined: Mon Feb 14, 2011 12:24 am

linker error -> undefined reference to

Post by spacetime »

:D I found the problem
you have to add

Code: Select all

#include "CSceneNodeAnimatorCameraFPS.cpp"
in CIrrBPCamera.h to other includes. The class is forward declared but not defined so the linker does not know about it.
Happy I found it.
spacetime
Posts: 15
Joined: Mon Feb 14, 2011 12:24 am

linker error -> undefined reference to `CSceneNodeAnimato

Post by spacetime »

the solution I posted worked for the example but not for my project (which is actually only a test)
So this things worked for me for both:
1. adding "BulletMultiThread.a" for linking
2. adding "using namespace bullet" in my program (left IrrBP.h unchanged)
3. and finally - the main problem - CSceneNodeAnimatorCameraFPS.h and CSceneNodeAnimatorCameraFPS.cpp are not in the CodeBlocks project !!!! You have to add them to the project before you make your lib.
Now everything compiles and links fine :D :D
Zurzaza
Posts: 153
Joined: Fri Mar 26, 2010 9:41 pm
Location: Filo (FE), Italy
Contact:

Post by Zurzaza »

Thank you all for the support.
In the last month i had a lot of works to do, so i was away from my PC.
In the next days i'll release a new svn update (and a minor packet release) with all your updates.

@nyfinscyf: Character controllers have been implemented, but in a "virtual" classs. So if you want something more specific (that isn't a vehicle), you have to implement it.
irrBP - an Irrlicht - Bullet Physics Wrapper.
The only irrlicht-physics wrapper that uses multithread technology.
spacetime
Posts: 15
Joined: Mon Feb 14, 2011 12:24 am

Re: irrBP - An Irrlicht - Bullet Physics Wrapper

Post by spacetime »

Glad you're back.
I was not able to remove the constraint. It compiles but nothing happens :(
spacetime
Posts: 15
Joined: Mon Feb 14, 2011 12:24 am

Re: irrBP - An Irrlicht - Bullet Physics Wrapper

Post by spacetime »

I have added an option in the example to remove constraint and it works perfectly. In my code id does not :cry: .So it's my code. I will have to figure it out by myself.
user-r3
Posts: 70
Joined: Tue Dec 07, 2010 4:09 pm

Re: irrBP - An Irrlicht - Bullet Physics Wrapper

Post by user-r3 »

Hi there,

I just wanted to try this out and use it in my current project (FPS)

But I am not able to use the camera...
Well...
I tried the following:

Code: Select all

bulletmgr->createCamera(camera, 100);
camera is my FPS Cam

My problem:
I only fall (get affected by gravity), when I move (press WASD)

And I just don't get it, how to implement cameras correctly... At the moment the support forum seems to be offline...

So could anybody be so kind and tell me how to do that...?

Thanks and sorry for my stupidity...
spacetime
Posts: 15
Joined: Mon Feb 14, 2011 12:24 am

Re: irrBP - An Irrlicht - Bullet Physics Wrapper

Post by spacetime »

I would not affect camera by the physics. Try to follow your actor with the camera by setting the position and rotation to the camera when moving the actor depending on actor position and rotation
Radikalizm
Posts: 1215
Joined: Tue Jan 09, 2007 7:03 pm
Location: Leuven, Belgium

Re: irrBP - An Irrlicht - Bullet Physics Wrapper

Post by Radikalizm »

spacetime wrote:I would not affect camera by the physics. Try to follow your actor with the camera by setting the position and rotation to the camera when moving the actor depending on actor position and rotation
True, camera movement should be defined by the actor it's following, but you don't want your camera to be able to go through terrain or other objects since it could cause your view to get obstructed, so it should incorporate some form of collision detection provided by the physics engine
LookingForAPath
Posts: 49
Joined: Tue Jan 18, 2011 12:35 am

Re: irrBP - An Irrlicht - Bullet Physics Wrapper

Post by LookingForAPath »

-Scratch, you can delete this post if you want too, it was about my linker error problems-

I rebuilt all IrrBP and bullet 2.77 and added the additional dependencies a different way, solving all my linker problems.
Thanks :)
mubashar
Posts: 63
Joined: Wed Sep 07, 2011 7:20 pm

Re: irrBP - An Irrlicht - Bullet Physics Wrapper

Post by mubashar »

Hello i triend to compile in VS 2008 and get this i am including libraries in that order

#pragma comment(lib, "Irrlicht.lib")
#pragma comment(lib, "irrBPLib.lib")
#pragma comment(lib, "BulletSoftBody.lib")
#pragma comment(lib, "BulletCollision.lib")
#pragma comment(lib, "LinearMath.lib")

also included as additional dependencies whats the problem ...

1>Linking...
1>LINK : warning LNK4075: ignoring '/INCREMENTAL' due to '/LTCG' specification
1>LIBCMTD.lib(dbgheap.obj) : error LNK2005: __heap_alloc already defined in LIBCMT.lib(malloc.obj)
1>LIBCMTD.lib(dbgheap.obj) : error LNK2005: __recalloc already defined in LIBCMT.lib(recalloc.obj)
1>LIBCMTD.lib(dbgheap.obj) : error LNK2005: __msize already defined in LIBCMT.lib(msize.obj)
1>LIBCMTD.lib(malloc.obj) : error LNK2005: _V6_HeapAlloc already defined in LIBCMT.lib(malloc.obj)
1>LIBCMTD.lib(dbghook.obj) : error LNK2005: __crt_debugger_hook already defined in LIBCMT.lib(dbghook.obj)
1>LIBCMTD.lib(sbheap.obj) : error LNK2005: ___sbh_pHeaderDefer already defined in LIBCMT.lib(sbheap.obj)
1>LIBCMTD.lib(sbheap.obj) : error LNK2005: __get_sbh_threshold already defined in LIBCMT.lib(sbheap.obj)
1>LIBCMTD.lib(sbheap.obj) : error LNK2005: __set_sbh_threshold already defined in LIBCMT.lib(sbheap.obj)
1>LIBCMTD.lib(sbheap.obj) : error LNK2005: __set_amblksiz already defined in LIBCMT.lib(sbheap.obj)
1>LIBCMTD.lib(sbheap.obj) : error LNK2005: __get_amblksiz already defined in LIBCMT.lib(sbheap.obj)
1>LIBCMTD.lib(sbheap.obj) : error LNK2005: ___sbh_heap_init already defined in LIBCMT.lib(sbheap.obj)
1>LIBCMTD.lib(sbheap.obj) : error LNK2005: ___sbh_find_block already defined in LIBCMT.lib(sbheap.obj)
1>LIBCMTD.lib(sbheap.obj) : error LNK2005: ___sbh_free_block already defined in LIBCMT.lib(sbheap.obj)
1>LIBCMTD.lib(sbheap.obj) : error LNK2005: ___sbh_alloc_block already defined in LIBCMT.lib(sbheap.obj)
1>LIBCMTD.lib(sbheap.obj) : error LNK2005: ___sbh_alloc_new_region already defined in LIBCMT.lib(sbheap.obj)
1>LIBCMTD.lib(sbheap.obj) : error LNK2005: ___sbh_alloc_new_group already defined in LIBCMT.lib(sbheap.obj)
1>LIBCMTD.lib(sbheap.obj) : error LNK2005: ___sbh_resize_block already defined in LIBCMT.lib(sbheap.obj)
1>LIBCMTD.lib(sbheap.obj) : error LNK2005: ___sbh_heapmin already defined in LIBCMT.lib(sbheap.obj)
1>LIBCMTD.lib(sbheap.obj) : error LNK2005: ___sbh_heap_check already defined in LIBCMT.lib(sbheap.obj)
1>LIBCMTD.lib(isctype.obj) : error LNK2005: __isctype_l already defined in LIBCMT.lib(isctype.obj)
1>LIBCMTD.lib(isctype.obj) : error LNK2005: __isctype already defined in LIBCMT.lib(isctype.obj)
1>MSVCRT.lib(MSVCR90.dll) : error LNK2005: _sprintf already defined in LIBCMT.lib(sprintf.obj)
1>MSVCRT.lib(MSVCR90.dll) : error LNK2005: _printf already defined in LIBCMT.lib(printf.obj)
1>MSVCRT.lib(MSVCR90.dll) : error LNK2005: _malloc already defined in LIBCMT.lib(malloc.obj)
1>MSVCRT.lib(MSVCR90.dll) : error LNK2005: _free already defined in LIBCMT.lib(free.obj)
1>MSVCRT.lib(ti_inst.obj) : error LNK2005: "private: __thiscall type_info::type_info(class type_info const &)" (??0type_info@@AAE@ABV0@@Z) already defined in LIBCMT.lib(typinfo.obj)
1>MSVCRT.lib(ti_inst.obj) : error LNK2005: "private: class type_info & __thiscall type_info::operator=(class type_info const &)" (??4type_info@@AAEAAV0@ABV0@@Z) already defined in LIBCMT.lib(typinfo.obj)
1>LINK : warning LNK4098: defaultlib 'LIBCMT' conflicts with use of other libs; use /NODEFAULTLIB:library
1>LINK : warning LNK4098: defaultlib 'LIBCMTD' conflicts with use of other libs; use /NODEFAULTLIB:library
1>LINK : warning LNK4098: defaultlib 'MSVCRT' conflicts with use of other libs; use /NODEFAULTLIB:library
1>IrrBPLib.lib(CIrrBPWorld.obj) : error LNK2001: unresolved external symbol "public: __thiscall SpuGatheringCollisionDispatcher::SpuGatheringCollisionDispatcher(class btThreadSupportInterface *,unsigned int,class btCollisionConfiguration *)" (??0SpuGatheringCollisionDispatcher@@QAE@PAVbtThreadSupportInterface@@IPAVbtCollisionConfiguration@@@Z)
1>IrrBPLib.lib(CIrrBPWorld.obj) : error LNK2001: unresolved external symbol "void * __cdecl SolverlsMemoryFunc(void)" (?SolverlsMemoryFunc@@YAPAXXZ)
1>IrrBPLib.lib(CIrrBPWorld.obj) : error LNK2001: unresolved external symbol "void * __cdecl createCollisionLocalStoreMemory(void)" (?createCollisionLocalStoreMemory@@YAPAXXZ)
1>IrrBPLib.lib(CIrrBPWorld.obj) : error LNK2001: unresolved external symbol "public: __thiscall btParallelConstraintSolver::btParallelConstraintSolver(class btThreadSupportInterface *)" (??0btParallelConstraintSolver@@QAE@PAVbtThreadSupportInterface@@@Z)
1>IrrBPLib.lib(CIrrBPWorld.obj) : error LNK2001: unresolved external symbol "public: __thiscall Win32ThreadSupport::Win32ThreadSupport(struct Win32ThreadSupport::Win32ThreadConstructionInfo const &)" (??0Win32ThreadSupport@@QAE@ABUWin32ThreadConstructionInfo@0@@Z)
1>IrrBPLib.lib(CIrrBPWorld.obj) : error LNK2001: unresolved external symbol "void __cdecl SolverThreadFunc(void *,void *)" (?SolverThreadFunc@@YAXPAX0@Z)
1>IrrBPLib.lib(CIrrBPWorld.obj) : error LNK2001: unresolved external symbol "void __cdecl processCollisionTask(void *,void *)" (?processCollisionTask@@YAXPAX0@Z)
When it's all over, it's not who you were. It's whether you made a difference
zerochen
Posts: 273
Joined: Wed Jan 07, 2009 1:17 am
Location: Germany

Re: irrBP - An Irrlicht - Bullet Physics Wrapper

Post by zerochen »

you have to change your projekt settings or the settings of the lib
in your project and all libs this setting must be the same
properties -> C/C++ -> code generation -> runtime lib
Last edited by zerochen on Thu Jan 12, 2012 10:45 pm, edited 1 time in total.
mubashar
Posts: 63
Joined: Wed Sep 07, 2011 7:20 pm

Re: irrBP - An Irrlicht - Bullet Physics Wrapper

Post by mubashar »

@zerochen i have recompiled bullet 2.77 for visual studio 2008 i am using Multithreaded in C/C++->Code Gen->Run Time lib and still getting these errors
When it's all over, it's not who you were. It's whether you made a difference
Post Reply