Ambiera Forum

Discussions, Help and Support.

Create a new account, Search, or Login:
Name:  Password:
Ambiera Forum > CopperCube > Help with CopperCube
bounding box - offset
Author Text

2021-01-09 05:47:13

I notice the mesh bounding box doesn't match the mesh itself once the mesh is moved.
There is an offset for some reason - particularly noticed once an object is rotated on an axis like a door - its bounding box no longer is detected correctly using the "ccbDoesLineCollideWithBoundingBoxOfSceneNode".

I was hoping to do a simple thing like open a door and detect objects inside a fridge but its picking up the door even after its been opened. 30 deg, no good, 60 deg, bit better, 90 deg seems ok then but didnt want to open it 90 degrees...

I wish a detection could be made for the mesh vertices itself but this has been mentioned before.

Any suggestions to fix this anyone ?
even using 2d planes have this issue...

Registered User
2021-01-12 22:12:29

Robo, I uploaded a small project that contains a rotating door in this subfolder "Rotating door" inside my online CCB shared folder!AjokN1FU3jK1...

It would be interesting to verify if that problem of wrong bounding box occurs with the mesh included in that project.

2021-01-12 23:20:42

hi marcw,

yes, the bounding box is around 45 degrees offsett from the actual 3D mesh.

It doesn't seem to affect the outer edge of the door so much (near door handle) as to the inner edge (near the hinges)...This is where I find an issue when selecting items inside the fridge near to the hinges as the door is opened I get issues unless its opened all the way..

see here:

Registered User
2021-01-13 19:49:05

Hi Robo,

Thank you for sharing that special behavior with us.

I enjoyed spending more time to understand that difficult built in command "ccbDoesLineCollideWithBoundingBoxOfSceneNode(node, startX, startY, startZ, endX, endY, endZ)".

Is there a bug, is there a solution ? I cannot answer.

However I uploaded a new project combining yours and mine with additional scripts that could perhaps help to decrypt the process of that command.

new CCB file "2021-01-13-rotating-door-bounding-box-analysis.ccb" uploaded in the same subfolder mentioned in my previous comment.

In that project, it is with the camera1 that the placement of the mouse is defined.
Cameras 2 and 3 are static; they show the position and target of the camera 1 and the active position of the mouse.
The position of the mouse shown with cameras 2 and 3 is not useful.

I hope you could find the perfect solution.

Create reply:

Posted by: (you are not logged in)

Enter the missing letter in: "Inter?ational" (you are not logged in)




Forum Codes

Feature Code
Link [url] [/url]
Bold [b]bold text[/b]
Image [img][/img]
Quote [quote]quoted text[/quote]
Code [code]source code[/code]