Page 3 of 5

Posted: Sun Dec 13, 2009 8:48 pm
by PI
Oh, shoot. Really. I'm uploading it to megafileupload.

Here you go:
http://www.megafileupload.com/en/file/1 ... 0-zip.html

Posted: Sun Dec 13, 2009 10:29 pm
by shadowslair
Hey, I see some serious progress here! Thanks for releasing this, pal! Cheers! :wink:

Posted: Mon Dec 14, 2009 12:44 am
by MikeDee
Wow really impressive and useful !

I really hope you keep on updating this and fix the known issues, in the meanwhile I'll surely use this for my incoming projects ! :D

Posted: Mon Dec 14, 2009 1:32 pm
by PI
Thank you guys!

Yeah and I'd like to see how it works in some other projects! :D

Posted: Wed Jun 30, 2010 6:07 am
by B@z
hey
can u help me a bit please?

if i add a terrain, set its position (not initially, but after creating, and before creating the selector), the selector isnt made in the new position, but the old. same happens to the scale too.

i need this, because im using deserializeAttributes, what makes an empty terrain, then load the datas into this.

So i need to somehow, update the LOD maybe?

thanks

Re:

Posted: Wed Jun 30, 2010 1:47 pm
by PI
Hey,

Call ->reset() on the object!

That will reset it's matrices from the current position / rotation / scale.

Cheers

Posted: Wed Jun 30, 2010 3:33 pm
by detvog
Hi, i like this.

I am searching a code to move an entity as player. Not the camera.
Can anyone help me with a code snippet?





Sorry for my bad english..

Posted: Wed Jun 30, 2010 4:21 pm
by shadowslair
Well, you simply pass your character node to the entity, not the camera node and you have a character model to get updated by the entity. Sth like:

Code: Select all

scene::IAnimatedMeshSceneNode* myNode = smgr->CREATE YOUR NODE HERE AS USUAL
ent = cmgr->addEntity(core::vector3df(0, 0, 40), sphereSampler, myNode);
Then set the position of your camera accordingly to myNode position and you`re done. :wink:

Posted: Wed Jun 30, 2010 4:35 pm
by detvog
shadowslair wrote:Well, you simply pass your character node to the entity, not the camera node and you have a character model to get updated by the entity. Sth like:

Code: Select all

scene::IAnimatedMeshSceneNode* myNode = smgr->CREATE YOUR NODE HERE AS USUAL
ent = cmgr->addEntity(core::vector3df(0, 0, 40), sphereSampler, myNode);
Then set the position of your camera accordingly to myNode position and you`re done. :wink:

That' s ok.
But to move the entity i must use Entity->addForce(VectForward * Speed)
I have no plan for VectForward.Sorry I'am not a Profi.

Posted: Wed Jun 30, 2010 5:58 pm
by shadowslair
the addForce() just takes a direction vector in world space. It is say a normalized vector multiplied by some speed value. If you wanna your character to move on the X axis only, you set camForward to (1,0,0) *speed etc.

You probably want to rotate your character using the keys and move in his facing direction. Then you simply do:

Code: Select all

// in CGameCamera.h or whatever you name it
f32 charPanAngle; // your character angle around Y axis in WS


// in CGameCamera constructor:
charPanAngle = 0; // init var to some value -> your initial rotation

// in CGameCamera::updateMovement() on the correct place:

f32 rotationSpeed = 0.6f;
charPanAngle += (game->getInput()->getKeyDown(irr::KEY_KEY_D) - game->getInput()->getKeyDown(irr::KEY_KEY_A) ) * rotationSpeed;


// way-to-do-it 1: 
core::vector3df camForward = core::vector3df(0,0,1);
camForward.rotateXZBy(charPanAngle);

// way-to-do-it 2:
core::vector3df rotPan(0, charPanAngle, 0);
core::vector3df camForward = rotPan.rotationToDirection();

// now you have a direction vector (normalized)
float runSpeed = 0.1f // depends on your game world scale

// do sth to move it in the needed direction:
if (game->getInput()->getKeyDown(irr::KEY_KEY_W) || game->getInput()->getKeyDown(irr::KEY_UP))      ent->addForce(camForward * runSpeed);
    if (game->getInput()->getKeyDown(irr::KEY_KEY_S) || game->getInput()->getKeyDown(irr::KEY_DOWN))    ent->addForce(-camForward * runSpeed);
or sth alike. Too lazy to test itr right now, but it should be working as expected with minor tweaks. :)

Re:

Posted: Wed Jun 30, 2010 6:21 pm
by PI
Thanks shadowslair :D

Just to make it clear, I'm no longer continuing the project due to lack of interest. To get the latest sources contact me at: pi24<dot>contact<at>gmail<dot>com

Have a nice day

Posted: Sat Jul 03, 2010 2:05 am
by netpipe
i'm interested in the source for this still, please update it. i got the old one running on linux and it was great.

Posted: Sat Jul 03, 2010 9:17 am
by shadowslair
tecan wrote:i'm interested in the source for this still, please update it. i got the old one running on linux and it was great.
I`m not authorized for such an answer, but as he said you email him for the latest source. Problem with updating the first post is, that version 1.1 is not ready for official release- with demos, docs, tuts, examples and on. It contains a few API changes and bugfixes...

Posted: Sat Jul 03, 2010 8:27 pm
by PI
Hi,

@tecan: I guess it was your email, I've sent it to you :)

@shadowslair: You're 100% authorized :) Also, I've told him you've got a working version of it, and to contact you if he wants it, I hope you don't mind! :)

Cheers

Posted: Sat Jul 03, 2010 9:08 pm
by shadowslair
PI wrote:@shadowslair: You're 100% authorized :) Also, I've told him you've got a working version of it, and to contact you if he wants it, I hope you don't mind! :)
No, not at all. I can always dig it from "da-dusty-shelf". :D