Character control and animation transition sample

Post those lines of code you feel like sharing or find what you require for your project here; or simply use them as tutorials.
theOneAwaited
Posts: 12
Joined: Fri Aug 14, 2009 10:03 am
Location: Netherlands

Post by theOneAwaited »

Thanks for the advice on how to set the character's position. But now if I use
viethero->move(targetPoint);
viethero->setPosition(vector3df(viethero->getPosition().X,
terrain->getHeight(viethero->getPosition().X,viethero->getPosition().Z)
,viethero->getPosition().Z));
my character hardly moves at all! Is it because of his radius or ellipsoid translation?
I uploaded my project at this link if anyone can please take a look:

http://www.box.net/shared/eqhhh6l6oi

The only real changes I made to your example were the camera controls. So I still have no idea if your character was always floating (because of your camera view) or if its my fault.

Camera controls:
Hold RMB to rotate came
MMB zooms in and out
LMB to click a target and player will move.

I will appreciate anyone's help on how to make my character level with the ground! :lol:
theOneAwaited
Posts: 12
Joined: Fri Aug 14, 2009 10:03 am
Location: Netherlands

Post by theOneAwaited »

So I've noticed some people have downloaded my file and still not responded. Is there a problem with the file?

Does anyone know how to fix this problem??

I know people say, "oh you need a physics engine" to make the character move correctly, but it seems more simple than that.

If the character is exactly level with the ground, he's stuck and jitters, or else hits a mysterious spot, translates 15 units up, and then starts walking to the target in the air.....

So is this his bounding sphere, or ellipsoid translation??

Sorry for being a noob, but I would love to solve this problem.
shadowslair
Posts: 758
Joined: Mon Mar 31, 2008 3:32 pm
Location: Bulgaria

Post by shadowslair »

Not working for me, showing the message:

"This application has failed to start because the application configuration is incorrect. Reinstalling the app may fix this problem." :?
"Although we walk on the ground and step in the mud... our dreams and endeavors reach the immense skies..."
sp00n
Posts: 114
Joined: Wed Sep 13, 2006 9:39 am

Post by sp00n »

shadowslair
you need to have installed VC2005 or 2008 run-time libraries (i recomended also install sp1 for each runtime) All of this stuff you can find at the microsoft site.
Good luck
zerochen
Posts: 273
Joined: Wed Jan 07, 2009 1:17 am
Location: Germany

Post by zerochen »

i think he gets the error when he starts the NinjaWalk.exe. isn t it?

recompile the projekt
add irrlicht.lib
if you use svn add

Code: Select all

const ISceneNode* hitNode;
//line 213 in main.cpp
if (smgr->getSceneCollisionManager()->getCollisionPoint(line, selector, intersection, tri, hitNode))
{
   ...
}
copy the irrlicht.dll in the folder

everything works fine:)
theOneAwaited
Posts: 12
Joined: Fri Aug 14, 2009 10:03 am
Location: Netherlands

Post by theOneAwaited »

I'm glad you got the program to work :)
Did you see the weird movement issues with the character?

Such as being stuck, sliding, or reaching an invisible point and suddenly translating up before walking to the target?
theOneAwaited
Posts: 12
Joined: Fri Aug 14, 2009 10:03 am
Location: Netherlands

Post by theOneAwaited »

Well if anyone is interested, the problem was really simple. It was fixed with making the radius smaller. You should also play around with the sliding value and starting position of the character. Then it should be just fine.
boo
Posts: 1
Joined: Sun Feb 28, 2010 1:38 pm
Location: south korea

thank you

Post by boo »

thank you..^^*
Hi, irrlicht world!
Post Reply