Raised This Month: $ Target: $400
 0% 

[REQ] Adding to Velocity


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Depresie
Veteran Member
Join Date: Nov 2013
Old 05-26-2015 , 13:17   [REQ] Adding to Velocity
Reply With Quote #1

Can someone create something like this? im trying now for 4 days i can't get it right..

If player pressed "Move Forward" button, get_user_velocity + defined value, direction forward
If player pressed "Move Right" button, get_user_velocity + defined value, direction right
If player pressed "Jump" button, get_user_velocity + defined value, direction up

Also, if the player is having 50 velocity to forward, 30 right, 25 up
If player pressed "Move Forward" button, it wont affect the other directions' velocity, so it will result in
Quote:
Vel[x] = 50 + Value
Vel[y] = 30
Vel[z] = 25
something like
Quote:
if (button & in_forward)
velocity[x] = get_user_velocity[x] + defined value
velocity[y] = get_user_velocity[y]
velocity[z] = get_user_velocity[z]

Last edited by Depresie; 05-28-2015 at 10:22.
Depresie is offline
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 20:07.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode