Page 1 of 1

hinge2

Posted: Thu Mar 30, 2017 10:39 am
by bagraider
hey guys, i am now messing around with bullet physics and wanted to try out a vehicle. so i'm playing around with bthinge2constraint.
all i did so far is just create 4 hinge2 object and attach four cylinder to a rectangle.
now could some one please explain the first param for the func setTargetVelocity(). what if i wanted to rotate the wheel around the y axis(to simulate steering) what index should i use?.

Re: hinge2

Posted: Thu Mar 30, 2017 12:26 pm
by S1L3nCe
Hi,

There is a sample code for vehicles in Bullet examples: https://github.com/bulletphysics/bullet ... s/Vehicles
You'll find all answers you need in this.

As the example, you should use btHingeConstraint instead of btHinge2Constraint.

Re: hinge2

Posted: Fri Mar 31, 2017 12:27 am
by bagraider
i figured it out, and btw if anyone else had problem with this it's the index 5 that rotate around the y axis.