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

boxbee
Registered User
Quote
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.


niko
Moderator
Quote
2013-01-30 09:28:05

The best would be to use a CollisionResponseAnimator: http://www.ambiera.com/copperlic...
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: http://www.ambiera.com/copperlic...

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(): http://www.ambiera.com/copperlic...


Create reply:


Posted by: (you are not logged in)


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


Text:

 

  

Forum 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


   





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