## Tree Collision Double Sided Collision

A place to discuss everything related to Newton Dynamics.

Moderators: Sascha Willems, walaber

### Tree Collision Double Sided Collision

Hi,

I'm kind of new to Newton (although I have some previous experience working professionally with Meqon), and I was trying to use tree collisions in my app. I set it up following the tutorial, and was puzzled to see that it didn't work... After confirming the collision tree was correct (callback picked up the collision, but object went straight through it) and scratching my head for quite a while, I noticed in the readme.txt of my version (1.53 on Mac) that tree collisions faces are single sided for raycasting and contact points ! I changed the orientation of my test face, and what do you know, it worked !!!

My question now is, is there a way to set Newton to use double sided faces for tree collisions ? I honestly have no idea how the faces are oriented in my meshes, and it would * to have random holes in the collision mesh because some faces are facing the wrong way...

Thanks, and great work on the lib, it's a lot of fun to play with and very easy to understand !

Marco
benitosub

Posts: 10
Joined: Tue Jan 20, 2009 10:17 am

### Re: Tree Collision Double Sided Collision

faces are single sided, teer is no way to change that.
Also try to full the engine into having a double side face by summintiong two oppsited face will fail catatrofically.

in general mesh have face tha are all well behave and it is very eassy to an arthist to make sure that condition is satified.

also you can get 2.0 now it have many bug fixed in teh tri mesh collision
Julio Jerez
Moderator

Posts: 11155
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

### Re: Tree Collision Double Sided Collision

Hey Julio,

oddly enough I had thought just of that right after posting my message (fooling the engine by submitting each face twice, once in each order) and it works ... Funny huh ? On the other hand the geometry I'm using is extremely simple (basically just axis aligned planes), maybe that helps ? Anyway thanks for your reply, and just out of curiosity, where in Spain are you ? (I assumed from your name you are in Spain, pardon me if you are from South America )

Marco
benitosub

Posts: 10
Joined: Tue Jan 20, 2009 10:17 am

### Re: Tree Collision Double Sided Collision

Julio Jerez wrote:Also try to full the engine into having a double side face by summintiong two oppsited face will fail catatrofically.

I use that in my game, it works well.. until you try to pass thru the side of the wall.. the wall ends need to be enclosed in another geometry.
Help improving the Newton Game Dynamics WIKI

JernejL

Posts: 1531
Joined: Mon Dec 06, 2004 2:00 pm
Location: Slovenia