Blockland Forums > Modification Help
Add Velocity
(1/4) > >>
howtoshotbillwetellyou:
I just need to know how i add a players velocity torwards the direction he is looking, but i don't know the equation dealing with the players rotation (if that is how it should be done or is it raycasting, or both?)

anyone care to help?
Destiny/Zack0Wack0:

--- Code: ---%player.addVelocity(vectorScale(%player.getForwardVector(),%speed));
--- End code ---
howtoshotbillwetellyou:

--- Quote from: Destiny/Zack0Wack0 on January 09, 2011, 09:39:48 AM ---
--- Code: ---%player.addVelocity(vectorScale(%player.getForwardVector(),%speed));
--- End code ---

--- End quote ---

ok thanks, lets say the player is looking north, how would i add velocity directly west to him.
Uxie:

--- Quote from: Destiny/Zack0Wack0 on January 09, 2011, 09:39:48 AM ---
--- Code: ---%player.addVelocity(vectorScale(%player.getForwardVector(),%speed));
--- End code ---

--- End quote ---
It doesn't say how much velocity it goes forward. ?
Destiny/Zack0Wack0:

--- Quote from: Uxie on January 09, 2011, 07:48:55 PM ---It doesn't say how much velocity it goes forward. ?

--- End quote ---
%speed
Navigation
Message Index
Next page

Go to full version