No Collision Detected

A place to discuss everything related to Newton Dynamics.

Moderators: Sascha Willems, walaber

Re: No Collision Detected

Postby Julio Jerez » Sat Jan 02, 2010 8:33 am

lesPaul456 wrote:In the center of the screen I can see the body I created for the ground. The falling object is no where to be seen.

what do you mean?
is the physics body behaving correctly or not.

if teh physics body is falling and hitting teh floor tne we can move to teh next step whin is fix teh trasform callback.
if it is not then there is a bug is the code that initialize the rigid bodies, which is it?
Julio Jerez
Moderator
Moderator
 
Posts: 12452
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: No Collision Detected

Postby lesPaul456 » Sat Jan 02, 2010 12:26 pm

I'm not sure what the problem was. I could see the ground, but not the falling object.

Thanks for all your help Julio. I've decided to just use the Irrlicht engine, since it has even more features than DarkGDK and Newton has already been successfully integrated with it.

I've already downloaded Irrlicht, and I have been messing around with it and Newton. Everything is working perfectly.

Thanks for all of your time and help!
User avatar
lesPaul456
 
Posts: 17
Joined: Thu Dec 31, 2009 9:24 pm

Re: No Collision Detected

Postby Julio Jerez » Sat Jan 02, 2010 1:39 pm

I do not want to tell you what to use, but that is not a good reason for switch Graphics library, that's a quiter way out.
what makes you think you are not going to find newer, perhaps more difficult problems with the new engine, what will you do then switch to a diffrent engine?

you should be able to integrate Newton with DarkGDK without har problems, those problems are just the intial learning curve difficultis anyone has when they start using an engine.
if you see the object now what we need to find out what is wrong wit the set up.
Julio Jerez
Moderator
Moderator
 
Posts: 12452
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: No Collision Detected

Postby lesPaul456 » Sat Jan 02, 2010 5:54 pm

I've been thinking of trying Irrlicht for a while. When I saw how easy it was to integrate Newton with Irrlicht I decided to try it out.

However, you're right. I guess I was giving up on using Newton with DarkGDK out of frustration. After reading you post, I felt guilty, and so I decided to give it another try.
I created a new project, and made the same setup, using a more organized approach. I setup the debug display (hid the DarkGDK objects to make sure I could see everything) and ran the application.

And then I saw something that made everything make sense.

The box that I created for the ground started out in the center of the sceen. The falling box was a little above it. The falling box dropped, and then eventually collided with the ground. Here comes the important part: when the falling box hit the ground, the ground dropped with the box! When I tried before, I was not updating the ground mesh's position with the ground NewtonBody's position, so it appeared that the falling box was passing through the ground.

So I looked over my code. I thought that I read in the Wiki that if you set the mass to below 0.01f, it would be immovable, so that's what I did. Before that, I set the mass, but not very high. I figured that had to be the problem, so I changed the mass of the ground to 1000. I ran the application and it worked perfectly. :D

Thank you for taking the time to help me with this Julio! You've been a great help!
User avatar
lesPaul456
 
Posts: 17
Joined: Thu Dec 31, 2009 9:24 pm

Re: No Collision Detected

Postby Stucuk » Sun Jan 03, 2010 12:29 am

Mass should be 0 for something to not move.
User avatar
Stucuk
 
Posts: 801
Joined: Sat Mar 12, 2005 3:54 pm
Location: Scotland

Re: No Collision Detected

Postby lesPaul456 » Sun Jan 03, 2010 4:24 pm

Thanks, that works. :D
User avatar
lesPaul456
 
Posts: 17
Joined: Thu Dec 31, 2009 9:24 pm

Previous

Return to General Discussion

Who is online

Users browsing this forum: No registered users and 52 guests