Interact with each other without rigidbody

Hi, I have 2 different objects and these two objects do not have solid objects. One of the objects is in motion, but not dynamically, but statically. How do I know if these 2 different objects collide?

Hi @Onur_Ozturk,

Maybe use bounding boxes? This example does something similar to detect picking without using physics:

Bounding boxes have a method that can detect intersections (when two bodies collide), which will give you what you are looking for.


Hi @Leonidas , thank you for your answer but i am undecided on how to integrate this example into my own project. If you have time, can you post a small sample project that prints a message on the console screen as soon as the 2 boxes touch each other? I am grateful to you :pray:

Here is a simple example, move the boxes in editor so they intersect:

var ShapePicker = pc.createScript('shapePicker');

// initialize code called once per entity
ShapePicker.prototype.initialize = function() {

    // Keep an array of all the entities we can pick at
    this.pickableEntities = [];
    // Register events for when pickable entities are created"shapepicker:add", this.addItem, this);

ShapePicker.prototype.addItem = function (entity, shape) {
    if (entity) {
        this.pickableEntities.push({entity, shape});

ShapePicker.prototype.update = function (dt) {

    this.pickableEntities.forEach(obj => {

        const results = this.detectIntersections(obj);

        if(results.length > 0){
            console.log('Intersects: ', =>;

ShapePicker.prototype.detectIntersections = function(referenceObj){

    const results = [];

    this.pickableEntities.forEach(obj => {

        if(referenceObj !== obj){

            const result = referenceObj.shape.intersects(obj.shape);

            if(result) results.push(obj.entity);

    return results;


Thank you so much :pray:

1 Like

Let’s say a short question, we have 3 different boxes and we have one main object, how can we determine which of these 3 different boxes touch with this method.