Forums

OverviewV-Play 1 SupportHello › Reply To: Hello

OverviewV-Play 1 SupportHello › Reply To: Hello
#5898

Alex
V-Play Team

Hi,

you can do something like this in your entity:

// the collider of your entity
BoxCollider {
  // properties and stuff...

  fixture.onBeginContact: {
    // determine the entityType of the collided entity
    var fixture = other;
    var body = fixture.parent;
    var component = body.parent;
    var collidedEntity = component.owningEntity;
    var collidedEntityType = collidedEntity.entityType;
    // replace "wall" with the entityType of your walls
    if(collidedEntityType === "wall") {        
      // remove the entity
      removeEntity();
    }
  }
}

Is this what you are looking for?

Cheers,
Alex

Ps: giving the forum thread a more meaningful name helps other developers find answers if they have similar questions 😉

Voted #1 for:

  • Easiest to learn
  • Most time saving
  • Best support

Develop Cross-Platform Apps and Games 50% Faster!

  • Voted the best supported, most time-saving and easiest to learn cross-platform development tool
  • Based on the Qt framework, with native performance and appearance on all platforms including iOS and Android
  • Offers a variety of plugins to monetize, analyze and engage users
FREE!
create apps
create games
cross platform
native performance
3rd party services
game network
multiplayer
level editor
easiest to learn
biggest time saving
best support