About Store Forum Documentation Contact



Post Reply 
Colision between Chrs
Author Message
Tupac Offline
Member

Post: #1
Colision between Chrs
Hi
I can't beleive i'm the first to ask it, but i didn't find any subject talking about that :
My question is simple: can i disable collision between Chrs ??

another one : can i remove inertia of a Chr cause the Chr stops too far when it goes fast and i do actionBreak();

thanks.
06-08-2009 10:36 AM
Find all posts by this user Quote this message in a reply
xenno Offline
Member

Post: #2
Re: Colision between Chrs
Hmmm
You could try with "T.ctrl.actor.ignore(bla bla)" functions, for example in my code:

Code:
T.ctrl.actor.ignore(item->actor,true);

Of course, search for actor.ignore functions and play with =)

And for the second, i think i did, but i don't remember. I will search.

PS: Hoo, perhaps 221 - Physical Clothing.cpp" could be usefull wink
PS2 : I wass bored and make a simple example XD
I added this in InitGame.
Code:
Physics.ignore(AG_ENEMYS,AG_PLAYER,true);

Define your groups as u want and add
Code:
T.ctrl.actor.group(YOUU_FLAGXP)
to yours actors.

Good luck ; )

My PC:
Proccessor: Core2 Quad Q9650
Ram: 4GB
HD: 500 Gb
Video Card: 285GTX 1Gb
Microsoft Windows Vista
06-08-2009 11:54 AM
Find all posts by this user Quote this message in a reply
Tupac Offline
Member

Post: #3
Re: Colision between Chrs
Ok i'll try coming back home. thnx
06-08-2009 03:33 PM
Find all posts by this user Quote this message in a reply
Tupac Offline
Member

Post: #4
Re: Colision between Chrs
i think i dont understand anything grin

i add this to my init:

for(int i=0; i< Chrs.elms(); i++) for(int j=0; j<Chrs.elms(); j++) Chrs[i].ctrl.actor.ignore(Chrs[j].ctrl.actor, true);

and i still have collisions !! :cry:

ps: Physics.ignore( INT GRP A, INT GRP B, BOOL true); // What is GRP A & B how to set it please ?
maybe that's the way ...
06-08-2009 05:50 PM
Find all posts by this user Quote this message in a reply
Esenthel Online
Administrator

Post: #5
Re: Colision between Chrs
the group_a and group_b are "Actor collision groups" (in Actor.h there's an enum ACTOR_GROUP)
you can assign a custom group 0..31 to each actor using Actor::group
06-08-2009 05:53 PM
Find all posts by this user Quote this message in a reply
Esenthel Online
Administrator

Post: #6
Re: Colision between Chrs
Quote:i add this to my init:
and in "Init" the Chrs container is empty, the container is filled only after first Game::World.update call
and besides it's much better to use "actor group <-> actor group" ignoring (than "actor <-> actor" ignoring)
this way you dont have to specify ignoring between all pairs of character actors (but only once using actor groups)
06-08-2009 05:56 PM
Find all posts by this user Quote this message in a reply
Tupac Offline
Member

Post: #7
Re: Colision between Chrs
OK !!
if i got it, i have to make a group by chr and make ignore list between eatch chrs, or set ignore actors for eatch chr after world update.i'm gonna use the last solution. it works greatly !

thnx lot !
06-08-2009 06:48 PM
Find all posts by this user Quote this message in a reply
Esenthel Online
Administrator

Post: #8
Re: Colision between Chrs
generally only this line should be enough:

Physics.ignore(AG_CONTROLLER,AG_CONTROLLER,true);
06-08-2009 06:51 PM
Find all posts by this user Quote this message in a reply
Tupac Offline
Member

Post: #9
Re: Colision between Chrs
Ok maybe that's faster ! thx a lot again.
06-09-2009 09:05 AM
Find all posts by this user Quote this message in a reply
Post Reply