1. Use the vehicle raycaster.
2. Use a regular shape (box or sphere) and constrain its movement to a vertical plane.
I'm trying the second approach, since it seems like the vehicle method might be overkill.
My plan is to use btGeneric6DofConstraint to constrain to a vertical plane of movement, but my question is how do i constrain it to an arbitrarily rotated plane? setLimit only uses x, y and z axes.
for example this constrains it to the xy plane:
Code: Select all
Constraint->setLimit(0, 1, 0);
Constraint->setLimit(1, 1, 0);
Constraint->setLimit(2, 0, 0);
Constraint->setLimit(3, 1, 0);
Constraint->setLimit(4, 1, 0);
Constraint->setLimit(5, 1, 0);