[SOLVED] Remove collision from object in SceneComposer

Hello, im new to JME3! I try to create scene in SceneComposer. The Scene contains some flowest and grass. I add Models to scene, but I can’t find property or setting to remove collision in scene from the Model. How can I remove collision from added Model? Screenshot shows the situation:

Why does your grass has an collision shape at all?

Thx big for you reply. I add model from Assets to SceneComposer and it’s automatic with collision, how can I deactivate it?
Or what I have to do to get no collision behavior?

I don’t use the SDK - but on the bottom left - the scene explorer - if you expand the redflower node - shouldn’t there be a rigidbody control child maybe?

Note that blue cube around the flower is not a collision shape it is just a visualization of bounding box of the model for indicating that the model in selected on the scene.

I think it is just the bounding box volume of your .j3o (when it is selected),not a physic collider.

Try to play in your scene, you should be able to pass through your grass object :wink:

Edit : too late ^^

If I add Model programmatically and do not add collision to it. It works and i can cross my grass or flower.

        Spatial blueflower = assetManager.loadModel("Models/plants/blueflower/blueflower.j3o");

But if I add Model in the SceneComposer it’s always body with collision.
Is there option to deactivate collision for this specific object in the scene?

Seems the problem is elsewhere. If you don"t manually add a collider it will not be added automatically by the SDK…at least the last time i imported a .blend model.
And from the screenshot you provide, in the scenegraph explorer, if a collider was attached to your flower, you should have a control (RigidBodyControl or something) attached to and we don’t see one there.

How do you generate the collider for the terrain? Maybe you generate it in code with the factory, i don’t remember the name, by passing the whole root node AFTER attaching the flower and a mesh collider including it is generated…just a random idea…

I create model in blender, and import it simple from SDK. I change only the Face Cull Mode to → Off
After import, I add it to scene in SceneComposer.
Optionally i can send you the blend file (in forum I can only upload images)
My import configuration:

This part seems ok for me.

Can you show the code part, especially where you generate the terrain collision ?

I add terrain in this method:

 private void addTerrain() {
        terrain = assetManager.loadModel("Scenes/world.j3o");
        this.terrain.addControl(new RigidBodyControl(0));

And “world.j3o” was what you saved from the scene editor with the grass and stuff already added?

Yes, i do!
What is the right step? I have to get terrain and add collision to it?

And i think the problem could be here. You don’t specify a colision shape to your rigidbody control, so the factory will internally generate one…maybe the frame after you added your flower to terrain so flower will be part of the mesh.

Take a look here.

     * When using this constructor, the CollisionShape for the RigidBody is generated
     * automatically when the Control is added to a Spatial.
     * @param mass When not 0, a HullCollisionShape is generated, otherwise a MeshCollisionShape is used. For geometries with box or sphere meshes the proper box or sphere collision shape is used.
    public RigidBodyControl(float mass) {
        this.mass = mass;

Is the flower saved as part of the world? If so, then RigidBodyControl should be adding collision to it. To work around this, add the RigidBodyControl to the ground in the SDK and remove the Java code that adds the RigidBodyControl to the world after it’s loaded.

daniep and haze thx big for help! Now I understand my problem! I don’t attentive look this video! It is realy simple!!!
Please all greenhorns like I’m watch attentive the sdk videos from normen!

No problem, glad you figured it out. :slight_smile:

:wink: You’re welcome. Have fun and happy coding :slight_smile: