Using velocity_by_aim() to Get Other Directions
Hello. I want to increate player's speed using velocity.
I have two directions so far: forwards, backwards. I need six of them: upwards, downwards, left, right. PHP Code:
|
Re: Using velocity_by_aim() to Get Other Directions
This ?
Quote:
|
Re: Using velocity_by_aim() to Get Other Directions
Didn't help. :|
Or I may need an example to fit it into my code. |
Re: Using velocity_by_aim() to Get Other Directions
Code:
I tried to do a modified version which supports these directions: PHP Code:
|
Re: Using velocity_by_aim() to Get Other Directions
Thanks, with some small editing I managed to get it working.
However I now have a new question. Can I retrieve the direction player is moving and increase the velocity to that direction? |
Re: Using velocity_by_aim() to Get Other Directions
Quote:
Is that what you want? |
Re: Using velocity_by_aim() to Get Other Directions
It gives me strange direction if I multiply X, Y, and Z by let's say 1.1.
|
Re: Using velocity_by_aim() to Get Other Directions
Quote:
Code:
new Float:fAngles[3]If it's up and down of player you don't need to calculate these... you only need to set fVelocity[2] to a negative or positive value. Unless you want to be up/down of player's VIEW, then you need to supply EV_VEC_v_angle |
Re: Using velocity_by_aim() to Get Other Directions
Quote:
And in my case if I go up, that doesn't mean that I only go UP, but it also depends on where I look. If I look at the ground, I won't go forward by pressing up though, I'll still go up, but a bit forward too. BTW this is for mod ESF, in which you can "swoop" into six directions. However setting the velocity of swoop direction gives some lame feeling once you turn from forward to let's say left (chainswooping), because default turning in that mod is more smooth and takes time to actually turn. That's why I simply need to increase the speed to the direction player is currently swooping. BTW I've tested all possible pev/pdata settings and nothing allows to increase the swooping speed (although normal speed increases well). |
| All times are GMT -4. The time now is 00:18. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.