Align To Vector Whoes
Blitz3D Forums/Blitz3D Programming/Align To Vector Whoes
| ||
Im having problems with Align to vector it keeps snapping to the grid im making a car (its wheels) hit the map and then using the coords of the wheel pivots to align to the map. but the car wont rotate when i use AlignToVector.. is their any other method of this without using AlignToVector?? PLEASE I NEED HELPING |
| ||
With AlignToVector you only align 1 axis at a time. You will need to have more than 1 call for align to ground ... |
| ||
In the b3d examples, there is an example called 'driver' that might be helpful. It shows a way to align a car to a terrain. First, the wheels are located on the terrain, then the car is aligned to the four wheels. |
| ||
the driver code is what i used, but its not helpfull it still makes rotating the entity impossible! is their another method? |
| ||
Using align to vector on the x and z axis should work just fine, providing the rotation of the vehicle is done with turnentity. Using rotateentity will undo all the alignment which I suspect you may be doing? Can you post some code? An alternative approach would be this ... http://www.blitzbasic.com/codearcs/codearcs.php?code=67 Another approach would be to use a single linepick and align to vector on the y axis only based on the pickednx, ny & nz. Not as accurate but may suit you needs. Stevie |
| ||
You could maybe parent the car to a pivot (entityparent), and then use AlignToVector on the pivot ? |
| ||
Btw, on a side note, the word is "woes". What you wrote looks like something else. Hope you get it figured out...I'm dealing with some rotation issues myself ;) |
| ||
@Stevie G This is what exactly what i was after!! i suck!! i cant do Tan2 calculations! lol Thanks again guys www.blitzbasic.com/codearcs/codearcs.php?code=67 |