Hi all,
I've just recently discovered Newton and I'm still figuring out how to do what. So far this seems to be a most excellent piece of software!
I'm trying to make a simple demo application where a user can place blocks of various shapes. (like this)
This works pretty well without much effort. The problem I have is this: I don't want the user to be able to spawn a block inside another block or the ground.
I figured, for a selected position I need to check if the collision primitive of the new block would collide with any of the collision primitives already in the world.
I looked around the forum and wiki and came up with a sollution using the functions NewtonCollisionCollide and NewtonCollisionCalculateAABB. That sollution is a little limited because I need a list of all blocks already added to the world. And even then I cannot detect spawning a block inside the ground...
Of course I could pass a reference to all static collision primitives (and their offset matrices) to my block class, but is there a better way?
Another thing I want to do is to select blocks. I would use NewtonCollisionRayCast again with all collision primitives I want to be selectable right?
Im going to try that tomorrow I think.
Any hints are very much appreciated!