About Store Forum Documentation Contact



Post Reply 
Few questions.
Author Message
Xhizors Offline
Member

Post: #1
Few questions.
First question

How can I disable collision against items and the player?

Second question

How does the drop item works?, I works to pick an item up but when try to drop that current item to the world again it wont work.

itemPickUp( pCurrentItem ); // Item picked up as normaly.

then call this in the same routine.

itemDropDown( pCurrentItem ); // Nothing happend.

Thanks.
10-05-2009 01:37 PM
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #2
Re: Few questions.
1) you will need to set X actor collision group for all item actors (Actor::group), and then disable collisions between X group and AG_CONTROLLER using Physics.ignore(X,AG_CONTROLLER)

2) please check inventory tutorial, and make sure that your item meets the requirements described in 'itemDropDown' method header
10-05-2009 01:43 PM
Find all posts by this user Quote this message in a reply
Xhizors Offline
Member

Post: #3
Re: Few questions.
Esenthel Wrote:1) you will need to set X actor collision group for all item actors (Actor::group), and then disable collisions between X group and AG_CONTROLLER using Physics.ignore(X,AG_CONTROLLER)

2) please check inventory tutorial, and make sure that your item meets the requirements described in 'itemDropDown' method header

Okay Thanks for your fast answers.

Cheers
10-05-2009 02:11 PM
Find all posts by this user Quote this message in a reply
Xhizors Offline
Member

Post: #4
Re: Few questions.
I setup it like this.

Code:
void Item::create(Game::ObjParams &obj)
{
    __super::create(obj);

    actor.group( AG_ITEMS );
}

Then

Physics.ignore( AG_ITEMS, AG_CONTROLLER );

But did not work.

One more question about dynamic creation for players.

I create a player like this

Code:
Game::ObjParams &obj=*Game::Objs("obj/chr/Test/0.obj");
Game::World.objCreate(obj,Matrix(obj.scale(),Vec(31, 5, 40.4 )) );

And I setup skeleton in the obj file in world editor, also a physic object.

But it seems like the character does not load the skeleton, it looks weird in game, But it works if I create it in the world editor and not dynamic.
10-05-2009 02:18 PM
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #5
Re: Few questions.
Quote:void Item::create(Game::ObjParams &obj)
{
__super::create(obj);

actor.group( AG_ITEMS );
}

Physics.ignore( AG_ITEMS, AG_CONTROLLER );

But did not work.
it should work

Quote:But it seems like the character does not load the skeleton, it looks weird in game, But it works if I create it in the world editor and not dynamic.
maybe you're forgetting to setup also the custom animations if you need them (Chr::sac) please check game basics tutorials for that
10-05-2009 02:44 PM
Find all posts by this user Quote this message in a reply
Xhizors Offline
Member

Post: #6
Re: Few questions.
Well the collision ignore does not work, And yes I have the custom animations setup. :/
10-05-2009 02:47 PM
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #7
Re: Few questions.
Physics.ignore( AG_ITEMS, AG_CONTROLLER );
are you setting this AFTER creating the physics?

what value has AG_ITEMS?

Quote:And yes I have the custom animations setup
you either need to experiment more, or provide more detailed information

check the tutorials (Bloody Massacre, there is setting custom skeleton for the Zombie and Zard monsters)

how does your character model looks like, how does the skeleton looks like, how it looks in ME/WE/Game
what custom animations are you overriding (paste codes)
10-05-2009 03:48 PM
Find all posts by this user Quote this message in a reply
Xhizors Offline
Member

Post: #8
Re: Few questions.
Esenthel Wrote:Physics.ignore( AG_ITEMS, AG_CONTROLLER );
are you setting this AFTER creating the physics?

what value has AG_ITEMS?

Quote:And yes I have the custom animations setup
you either need to experiment more, or provide more detailed information

check the tutorials (Bloody Massacre, there is setting custom skeleton for the Zombie and Zard monsters)

how does your character model looks like, how does the skeleton looks like, how it looks in ME/WE/Game
what custom animations are you overriding (paste codes)

That was the problem, Works now when I set ignore settings exact after the creation of the physics.

About the animations, The weird thing is that it works just fine when I create the player in the map editor, but the problem comes when I create it dynamic. Animations it setup correct, maybe it have something to do with the object creation in world editor?
10-06-2009 07:09 AM
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #9
Re: Few questions.
I need more details - codes, skeletons, mesh, animations...
10-06-2009 11:47 AM
Find all posts by this user Quote this message in a reply
Post Reply