hinge2

Post Reply
bagraider
Posts: 2
Joined: Thu Mar 30, 2017 10:28 am

hinge2

Post 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?.
S1L3nCe
Posts: 50
Joined: Thu Mar 24, 2016 10:22 am
Location: France

Re: hinge2

Post 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.
bagraider
Posts: 2
Joined: Thu Mar 30, 2017 10:28 am

Re: hinge2

Post 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.
Post Reply