Alignment problems.

Blitz3D Forums/Blitz3D Beginners Area/Alignment problems.

Maximus Primal(Posted 2005) [#1]
I am trying to do a driving game where you race in a walled in track. The track has both hills and long banked corners. The track and walls are seperate 3ds models which are loaded in.

I have got the player's vehicle to follow the hills properly. But when I go round the banked curve the player comes out of it slightly misaligned (as in not looking straight ahead). The vehicle is driveable as normal but just isn't facing the correct direction.

Anyone know what might cause this?

Also I have the the collision for the walls set to 2,1 (polygon,stop) but when the player hits a wall they will either drive straight through it or move over it. Again, any ideas why?

The code as it stands is below if it helps. A couple of notes though:

1) I started with Gravity on, but had to disable it as I could not get the correct alignment when using the linepick command with it on for some reason.

2) The objects are a little large (for ease when modeling them as I can adjust them more accurately) hence the large scale factor.


Any suggestions are really welcomed as this is already proving to be a lot harder than I imagined :(

Max




Rook Zimbabwe(Posted 2005) [#2]
Without having your models to test this out I wonder if this:

AlignToVector ship,PickedNX(),PickedNY(),PickedNZ(),2,0.5

might have something to do with it. The command reference lists this as:

AlignToVector entity,vector_x#,vector_y#,vector_z#,axis[,TRANSLATIONrate#] (I added the word TRANSLATION)

OK... so you have everything set and TRANSLATIONrate is set at .5 ( 0 being smooooth and 1 being SNAP)

I have to ask if the car ever straightens out??? and why is the AXIS set at 2? The Y axis.(I admit I am unsure which is used to describe LEFT RIGHT steering but maybe either another call for the alignment of the L/R mode???)

I am shooting through my hat here...

RZ


Ross C(Posted 2005) [#3]
Its the camera that is mis-aligned ;). check out your other post in the blitz3d programming or check your email max :o)