Home Game Development PhysicsX sprite youngster not following mother or father – Cocos Creator

PhysicsX sprite youngster not following mother or father – Cocos Creator

0
PhysicsX sprite youngster not following mother or father – Cocos Creator

[ad_1]

hello guys, i’m working with physicsX on IOS and i’ve a prefab with a mother or father node that has a Rigidboyd and colliders. this node has some childs with some sprites. In the editor every thing is working advantageous, however as soon as i make a construct for IOS, the rigidbody (the mother or father) is falling advantageous however the sprites doesn’t transfer.

If i set the sprites place manually within the replace all works advantageous once more. i’ve learn comparable points a number of years in the past. Any clue about what’s occurring? If i modify to a different physic engine all works advantageous.

Thks guys, any assist will likely be admire.

 replace()
    {
         
        this.childrenPosition(this.node);
    }

    childrenPosition(youngster)
    {
        youngster.setWorldPosition(this.node.getWorldPosition());

        for(var i = 0; i < youngster.kids.size; i++) {		// iterate by means of kids by index
            //reposicionar el nodo mirar sus hijos y rellamar esta funcion para cada uno de ellos
            var youngster = youngster.kids[i];
            this.childrenPosition(youngster);
        }
    }

Just in caso others have the identical challenge, i’ve solved it with that code within the mother or father node that has the rigidbody and the collider

I can’t fairly think about your situation, are you able to present a easy demo to breed this?

Hi!,
Please have a look this dialogue:

To reproduce it simply create a brand new scene, set the venture config to physicsX. Create a sphere with rigidbody and collider and as a baby (one other node) create a traditional sprite. In the editor the gravity will go advantageous and the decision will go down with the kid and the sprite. If you make a construct for ios, you will notice the ball falling down and the sprite simply quiet in the identical place that was spawned. that’s as a result of the mother or father remodel is affected by gravity however the youngster isn’t following the mother or father.

Thks.

Thanks, I’ve reproduce this challenge, and can repair it asap

identical this challenge on cocos creator 3.6.0x

[ad_2]

LEAVE A REPLY

Please enter your comment!
Please enter your name here