ambiera logo

Ambiera Forum

Discussions, Help and Support.

folder icon Ambiera Forum > CopperCube > Programming and Scripting
forum topic indicator Forcing a SceneNode to have collission
person icon
NEXEVG_CNZ
Guest
Quote
2026-09-23 03:43:48

I am trying to create a game with a level creator, which uses clones of scene nodes to create the map.

After the map is loaded, these clones completely lack collision in the 'Physics Simulation' mode, even if using ccbUpdatePhysicsGeometry().

I rather need to use Physics Simulation over Collision Only, as using Collision Only opens up a new load of problems I'd rather not have to deal with.

How would I go about giving these clones proper collision?

person icon
Sikes
Guest
Quote
2026-09-23 12:51:57

hey, unfortunately i dont know a fix but I find what you are doing interesting, a level creator is inspirational, can you showcase some of your work, i'm curious

person icon
gazzauk
Registered User
Quote
2026-09-23 17:03:50

This is something I've been looking to do or workaround but the collision system is mapped only to editor placed objects.

My workaround, depending on how the level worked was to pre-created the objects within a node named 'spawners' and move the node group of objects below the terrain or hidden within a box. Then move each object when needed within the scene to the place I wanted them to respawn.

of course, if it's 100's of objects then this is not a very practical solution but with the use of scripts within the editor should make it less painful.

Not sure if will help, have you looked into to: ccbUpdateSceneNodeBoundingBox(node)

Why ccbCloneSceneNode(node) was excluded from the editor is a real breaker for me.

person icon
dekon_17
Registered User
Quote
2026-09-23 18:10:43

Just tested it with a simple scene and, hell, I didn't even know there was such problem. From my results, I guess you're talking about copying static geometry, right?

I only have a solution for the "Collision only" mode, but it is a bit... complicated. Like, here's the structure I use for objects in my game:
House_1:
{
model: 'Assets/DefaultAssets/Models/Houses/House_1.obj',
material: {
Texture1: 'Assets/DefaultAssets/Textures/Houses/House_1_1.png'
},
collision: [{pos: (0, 20, 0), scale: (80, 60, 120)}],
navigation: [(70, 5, 50), (-70, 5, 50), (70, 5, -50), (-70, 5, -50)]
}
So, the whole "collision" part relies on copying a "collider" (an invisible primitive, only a cube right now) embedded into the game and attaching it to the model, because OF COURSE Coppercube also won't update collision for models created with all the mesh editing commands. And now it ALSO turns out that there's no way you can do that with even cloned static meshes in "Physics simulation" mode. Damn...

person icon
gazzauk
Registered User
Quote
2026-09-23 21:58:56

Yeak Dekon, think he's looking for physics simulated objects that are static within the scene.

person icon
NEXEVG_CNZ
Guest
Quote
2026-09-25 16:41:55

I have implemented a solution, based off of gazzauk's contribution.

I essentially have a giant amount of invisible solid cubes outside of the play area which are moved to each solid level tile as it is placed. It's part of the loading routine now, and works great.

person icon
gazzauk
Registered User
Quote
2026-09-26 11:16:17

It may also help performance to turn off visibility, collision and shadows on your 'spawner' objects until they are to be spawned into your scene.


Create reply:










 

  

Possible Codes


Feature Code
Link [url] www.example.com [/url]
Bold [b]bold text[/b]
Image [img]http://www.example.com/image.jpg[/img]
Quote [quote]quoted text[/quote]
Code [code]source code[/code]

Emoticons


icon_holyicon_cryicon_devilicon_lookicon_grinicon_kissicon_monkeyicon_hmpf
icon_sadicon_happyicon_smileicon_uhicon_blink   






Copyright© Ambiera e.U. all rights reserved.
Contact | Imprint | Products | Privacy Policy | Terms and Conditions |