ambiera home ambiera home

Ambiera Forum

Discussions, Help and Support.

Create a new account, Search, or Login:
Name:  Password:
Ambiera Forum > CopperLicht
BoundingBox Collisions
Author Text

Registered User
2013-01-16 22:43:52

I have been working on collisions for a week now, with little success. I have a bunch of cube scene nodes that I am trying to use as the ground of my game. I am trying to check collision with all of the cubes on engine.animate. I want to see if the player is on top of the cubes and if not he falls.

What is the best way to check for collisions? Can you get a handle to all Scene Nodes in a scene? When creating the ground is it not smart to use cubes as the ground, because I will need to create a lot of these?

Any help or advice would be appreciated. Thanks.

2013-01-30 09:28:05

The best would be to use a CollisionResponseAnimator:
Put all your cubes into a MetaTriangleSelector and use this as world triangle selector for that animator. Then everything works automatically. See the collision tutorials for this:

Alternatively, for manually checking: Get the transformed bounding box of your cubes (SceneNode.getTransformedBoundingBox()) and the returned object has a few methods like intersectsWithBox() and intersectsWithLine() and isPointInside():

Create reply:

Posted by: (you are not logged in)

Enter the missing letter in: "Interna?ional" (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]



Software: Ambiera Light Forum. © 2008-2019 Nikolaus Gebhardt, Ambiera e.U.