Raised This Month: $32 Target: $400
 8% 

velocity_by_aim


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
eyal282
Veteran Member
Join Date: Aug 2011
Old 10-26-2016 , 12:25   velocity_by_aim
Reply With Quote #1

Code:
public PreThinkCharge(id)
{
	if(Charging[id] != -2)
		return FMRES_IGNORED;
		
	new Float:origin[3], Float:vec[3], ori[3];
	
	//pev(id, pev_v_angle, origin);
	velocity_by_aim(id, 2000, origin);
	get_user_origin(id, ori);
	origin[2] = float(ori[2] - 250);
	
	entity_set_vector(id,EV_VEC_velocity, origin);

	return FMRES_IGNORED;
}
I got this code ( if you're interested I'm trying to make a charger (L4D2) plugin XD )

How to make these 2 view angles have the same velocity by aim? ( Like if you use +lookup / +lookdown the direction will remain the same, only +left / +right change the direction )

Like:

Code:
http://imgur.com/a/KjIHH
This should have the same velocity.

Last edited by eyal282; 10-26-2016 at 12:28.
eyal282 is offline
PartialCloning
Senior Member
Join Date: Dec 2015
Old 10-26-2016 , 14:35   Re: velocity_by_aim
Reply With Quote #2

angle[0] controls the up/down direction as far as angles and v_angles goes. As for velocity, velocity[2] controls the upside/down movement.
PartialCloning is offline
Reply


Thread Tools
Display Modes

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 17:42.


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