Little doubt: GetBody0();

A place to discuss everything related to Newton Dynamics.

Moderators: Sascha Willems, walaber

Little doubt: GetBody0();

Postby Auradrummer » Mon Dec 29, 2008 1:36 pm

Hello Guys,

A little doubt. I'm still newbie in programming, so there are some basics I still miss.
This piece of code aren't working.

Code: Select all
brmxJoint = Create (smgr, nWorld, driver);
const NewtonBody* car;
car = GetBody0();


The brmxJoint seems to work well, this is a MultiBodyVehicle.
But the code crashes on the third line. I want to get the object from the brmxJoint. I need it to add the tires.

The GetBody works with MultiBodyVechicle?

Thanks.
Developing a racing game.
Auradrummer
 
Posts: 132
Joined: Sat May 17, 2008 9:17 am

Re: Little doubt: GetBody0();

Postby Julio Jerez » Mon Dec 29, 2008 2:47 pm

maybe

car = brmxJoint->GetBody0() ;
Julio Jerez
Moderator
Moderator
 
Posts: 11155
Joined: Sun Sep 14, 2003 2:18 pm
Location: Los Angeles

Re: Little doubt: GetBody0();

Postby Auradrummer » Mon Dec 29, 2008 3:20 pm

Aha! You are good! (Or I am a mule!)
Developing a racing game.
Auradrummer
 
Posts: 132
Joined: Sat May 17, 2008 9:17 am


Return to General Discussion

Who is online

Users browsing this forum: No registered users and 3 guests