FunCollision v1.0 Source + Bin + Tutorials

Announce new projects or updates of Irrlicht Engine related tools, games, and applications.
Also check the Wiki
PI
Posts: 176
Joined: Tue Oct 09, 2007 7:15 pm
Location: Hungary

Post by PI »

Oh, shoot. Really. I'm uploading it to megafileupload.

Here you go:
http://www.megafileupload.com/en/file/1 ... 0-zip.html
shadowslair
Posts: 758
Joined: Mon Mar 31, 2008 3:32 pm
Location: Bulgaria

Post by shadowslair »

Hey, I see some serious progress here! Thanks for releasing this, pal! Cheers! :wink:
"Although we walk on the ground and step in the mud... our dreams and endeavors reach the immense skies..."
MikeDee
Posts: 35
Joined: Wed Nov 18, 2009 11:41 pm

Post 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
PI
Posts: 176
Joined: Tue Oct 09, 2007 7:15 pm
Location: Hungary

Post by PI »

Thank you guys!

Yeah and I'd like to see how it works in some other projects! :D
B@z
Posts: 876
Joined: Thu Jan 31, 2008 5:05 pm
Location: Hungary

Post 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
Image
Image
PI
Posts: 176
Joined: Tue Oct 09, 2007 7:15 pm
Location: Hungary

Re:

Post by PI »

Hey,

Call ->reset() on the object!

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

Cheers
detvog
Posts: 19
Joined: Sun Mar 02, 2008 8:49 am

Post 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..
shadowslair
Posts: 758
Joined: Mon Mar 31, 2008 3:32 pm
Location: Bulgaria

Post 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:
"Although we walk on the ground and step in the mud... our dreams and endeavors reach the immense skies..."
detvog
Posts: 19
Joined: Sun Mar 02, 2008 8:49 am

Post 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.
shadowslair
Posts: 758
Joined: Mon Mar 31, 2008 3:32 pm
Location: Bulgaria

Post 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. :)
"Although we walk on the ground and step in the mud... our dreams and endeavors reach the immense skies..."
PI
Posts: 176
Joined: Tue Oct 09, 2007 7:15 pm
Location: Hungary

Re:

Post 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
netpipe
Posts: 670
Joined: Fri Jun 06, 2008 12:50 pm
Location: Edmonton, Alberta, Canada
Contact:

Post 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.
Live long and phosphor!
-- https://github.com/netpipe/Luna Game Engine Status 95%
shadowslair
Posts: 758
Joined: Mon Mar 31, 2008 3:32 pm
Location: Bulgaria

Post 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...
"Although we walk on the ground and step in the mud... our dreams and endeavors reach the immense skies..."
PI
Posts: 176
Joined: Tue Oct 09, 2007 7:15 pm
Location: Hungary

Post 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
shadowslair
Posts: 758
Joined: Mon Mar 31, 2008 3:32 pm
Location: Bulgaria

Post 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
"Although we walk on the ground and step in the mud... our dreams and endeavors reach the immense skies..."
Post Reply