Turn and move player in direction

Hey i want to set up these ‘dash panels’ so when my hedgehog runs on them, he will be launched in the direction they are facing. I know how to make him run fast when he walks on it but how do i make him go the way its facing? thanks!
http://i112.photobucket.com/albums/n180/djtrickdog/dashpanels.png

Under sonic put: Collision with whatever property the dash panel has–>and–>force on some axis=whatever
Make sure the “L” isn’t selected.

Make a script that when you collide the panel:
get the panel orientation and set the orientation to the player
then active the motion actuator

Just setup python like this

if collisionwithobject.isPositive():
setLinearVelocity(0,0,0,1)

something like that should work.

lol, speedpanels. well you can use the function i made, alignAxisToVect() that is available in the svn builds.

you have to get a vector that points to the direction (the y axis of the orientation matrix of the dash panel should go fine), then align the y axis of the character to that vector, and apply a good impulse. simple ah?

the syntax of that function is alignAxisToVect(vector, axis) axis can be 0 for x, 1 for y or 2 for z, it makes the selected axis of the orientation matrix point the provided vector

(i’m too lazy, i will not make the script for you)

Ps: you can get the y axis of the orientation matrix this way


y_ori = [own.orientation[0][1],own.orientation[1][1],own.orientation[2][1]]

ps2: yes, i want you to make the script, i gave you all the clues you need :smiley: