About Store Forum Documentation Contact



Post Reply 
set collision group for chrs actor not works
Author Message
andrake Offline
Member

Post: #1
set collision group for chrs actor not works
Hi
i try to use Character class for my Personage.
Personage has its own actor shapes and it collide with ctrl.actor of chr.
i try to set different group for it but it anyway collided and actor fly in random way

byte a=1;
ctrl.actor.group(a);

byte g=2; //collision group of player

// settings for groups for collision detection
punch.group(g);
torse.group(g);
head.group(g);
rfoot.group(g);
rhip.group(g);
rleg.group(g);
lfoot.group(g);
lhip.group(g);
lleg.group(g);

ctrl.ignore(torse) works but i cant set it for every actor in scene.it will be simple to set actor that should collided for this actor

ctrl.actor.collision(false); also works strange. when i set it : my actor slow down in the ground. why slow i cant understood. density=1
(This post was last modified: 05-12-2014 03:36 PM by andrake.)
05-12-2014 03:29 PM
Find all posts by this user Quote this message in a reply
andrake Offline
Member

Post: #2
RE: set collision group for chrs actor not works
this.ctrl.actor.ignore(playerAI1.ctrl.actor);
this.ctrl.actor.ignore(playerAI2.ctrl.actor);
this also not works ...shapes collided anyway

also there is strange behaviour when i draw both: skeleton and actorshape. or controlshape and skeleton. but all is ok if i draw only skeleton or only shapes.


Attached File(s) Image(s)
   
(This post was last modified: 05-12-2014 05:03 PM by andrake.)
05-12-2014 04:53 PM
Find all posts by this user Quote this message in a reply
Rubeus Offline
Member

Post: #3
RE: set collision group for chrs actor not works
Physics.ignore( Int group_a, Int group_b, Bool ignore = true ); // ignore collisions between 'group_a' and 'group_b' actor group pairs (ACTOR_GROUP)
05-13-2014 12:01 AM
Find all posts by this user Quote this message in a reply
andrake Offline
Member

Post: #4
RE: set collision group for chrs actor not works
it works, Thank You. it solve my task. but even in this case when white shapes in orange shapes and i set Physics.ignore( Int group_a, Int group_b, Bool ignore = true ); between it i get slow down movin of character in the world(as on moon..slowly)

but if i set
ctrl.actor.ignore(torse);
ctrl.actor.ignore(head);
ctrl.actor.ignore(rfoot);
ctrl.actor.ignore(rleg);
ctrl.actor.ignore(rhip);
ctrl.actor.ignore(lfoot);
ctrl.actor.ignore(lleg);
ctrl.actor.ignore(lhip);
ctrl.actor.ignore(punch);

it works as i expected
(This post was last modified: 05-13-2014 03:02 PM by andrake.)
05-13-2014 02:39 PM
Find all posts by this user Quote this message in a reply
Post Reply