GameSalad

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Collidable actor

iboneibone Posts: 13Member
edited 7:20AM in Working with GS (Mac)
Hi

is there any way that I can create an actor that is collidable, but not with instances of itself?

Comments

  • ktfrightktfright Posts: 964Member
    can you kind of explain what you mean a bit more?
  • iboneibone Posts: 13Member
    i want to create an actor than can collide with certain objects, ie. walls but if there are several instances of this same actor, i do not want it to collide with versions of itself.

    for examle

    a car, is collidable and is in collidable group 1
    walls are collidable and also collidable group 1
    I want the car to collide with these walls. I do not want the car to collide with other instances of this car.
  • danreldanrel Posts: 28Member
    ibone,

    You should be able to just change the collision group number to '2' for the cars and have them collide with group '1'(walls). Set the cars so that they do not collide with group '2'(cars).

    That should work. Let us know if that does the trick.

    - danrel
  • iboneibone Posts: 13Member
    "Set the cars so that they do not collide with group '2'(cars)."

    how do you set that?
  • CodeMonkeyCodeMonkey Posts: 1,803Head Chef, Member, PRO
    Use the bounce behavior. In the actor for the cars, set their collision group attribute to 2. In the bounce behavior added to those actors, to collide with the other collision group with which you want to collide. On those other actor prototypes also include a bounce behavior to collide with group 2.

    Its should work for now, but there are still some issues that we are working out.
  • iboneibone Posts: 13Member
    Thanks CodeMonkey, although this doesnt seem to work for me at the moment. I shall try someting else for the time being.
This discussion has been closed.