SceneComposer

hi, I’ve been trying to learn to use the scenecomposer, seems simple enough, i created a new scene, added a terrain with a physics control, a skybox and an ambient light, all from the scenecomposer menu, all is fine so far but when i link or add a model to the scene an try to scale or move it around it doesn’t work, i mean i can move and scale with the tools but after i save the scene and reopen it the model is back to the origin point but it’s center is still in the position i put it. I don’t know what I’m doing wrong :frowning:

When its got a physics control its location has gotta be updated as well, else the spatial will be reset in the physics control location. The latest update should fix this by updating both locations in the scene composer though, check for updates via the help menu.

1 Like

updating didn’t fix the problem and now i get this message often when i open the scene



http://i.imgur.com/1Gh1y.png



though moving the model without the physics control works fine

Ok, simply create the physics control after you have placed the model then.

1 Like

thanks for the help :slight_smile:

there’s the problem that if i link a model to the scene i can’t add any controls to it through the scenecomposer, also if i add a model i can’t manipulate it and if i delete a linked model from the scene i can’t remove the link(?)

You just remove the link node itself. Since the linked asset is just linked in you cannot edit it, you have to edit the original…

while messing with the scene composer i found a couple of odd behaviors, they might be bugs or might just me being a noob however i’m going to leave them here to get a confirmation:

-when a model is added to the scene some times it doesn’t show in the scene explorer window, some times it does.

-if i add a model, scale it (for example, to twice its original size) and then i apply a Static RigidBody control it, the control seems to be scaled on top of the new size (in this case to 4 times the model’s original size).

-if i want to remove a linked model the only way i see it’s removing the contents of the link node (since the link node doesn’t give you the option to do so) but that leaves the node itself in the scene unremovable.

-removing a Static RigidBody control doesn’t seems to be recognized as a change to the scene and doesn’t give the option to save after doing so, if the scene is reopened the control is still in there but if instead something else is changed after removing the control and it’s saved, when the scene is reopened the control is no longer there.

-in the SceneExplorer window, dragging a node to a light node removes it from the scene.



updated today to make sure that it still happened in the latest version.

2 Likes

Thanks

I’m currently trying to figure out why the objects in the scene don’t collide with each other, currently i have the terrain and 2 models in my scene, they all have PhysiscsControls with collision group and collide with group set to 1 but they don’t collide. I created a sphere through code and they all collide with it :?



this is the code i use to load the scene:

[java]public void loadLevel(String levelName)

{

Node level = (Node) app.getAssetManager().loadModel(“Scenes/”+levelName+".j3o");

app.getRootNode().attachChild(level);

PhysicsControl aux;

int quantity = level.getQuantity();

for(int i=0; i < quantity; i++)

{

if((aux = level.getChild(i).getControl(PhysicsControl.class)) != null)

{

pS.add(aux);

}

}

}[/java]

pS is the physicsSpace and levelName is provided in the function

You can just add your objects to the physics space using physicsSpace.addAll(level); The collision/collidewith group integer is a bit mask, be careful when using it from the UI, best set it from code.

1 Like

thanks for the addAll tip, for the moment i don’t want to mess with the collision/collidewith groups, they are set back to default, but still the objects in the scene don’t collide with each other, also isn’t the terrain supposed to show a collision shape when i enable debug?

When you create mesh shapes for all objects they don’t collide. Mesh vs mesh will not collide, create dynamic hull shapes via the scene composer for things “on” the terrain.

1 Like

oh! so that’s what i was missing, many thanks

Hey there,
I’m sorry for digging out souch an old thread, but I’ve got the same problem.
Via the scene composer I added a PhysicsControl to the terrain (right click on the terrain in SceneExplorer -> Add Control… -> Static RigidBody)
and the same way to a “dynamic” object. In the properties of the PhysicsControl from the “dynamic” object I changed the mass to 1.0.
If I run this, the object falls through the terrain.
To solve this normen told to

[...] create dynamic hull shapes via the scene composer [...]

Now call me stupid, but: How do I do that? :amused:

EDIT:
Damn I realy am an idiot!
In the sceneComposer Window there are buttons and textfields below the “move”, “scale”, “rotate” buttons, for these
tasks!
Note to myself: Not everything is hidden in context- and submenus… :amused: