sentry turn to target using pev_controller
hello allieds
As the titile says i am trying to turn sentry gun towards target by PEV_CONTROLLER here is the picture https://i.imgur.com/mLULWZM.png the sentry gun model has two pev_controller one is for tilt (aiming sentry gun up and down if player is above ground) one is for rotating on his axis ( see in this video https://i.imgur.com/Zllr7Gp.mp4) the code use for turning towards target is below , which rotate the sentry gun on his axis and aim towars its target (taken from JGHG's sentry gun) PHP Code:
PHP Code:
i am weak in maths so can anybody help me ? |
Re: sentry turn to target using pev_controller
bump
nobody is helping :-( |
Re: sentry turn to target using pev_controller
I don't know if it work.
PHP Code:
Code:
Number of Bone Controllers: 2 |
Re: sentry turn to target using pev_controller
atlast , thank you for reply but i think you don't understand me
i wanted to make sentry gun aim at target , if target moves than it should rotate also with PEV_CONTROLLER you can see sentry_turntotarget function which i given , in that sentry tilt to target only Vertically like target move up and down than sentry aim up and down by pev_controller and what i wanted is that sentry tilt target if he moves horizontal (rotating on axis) also by pev_controller |
Re: sentry turn to target using pev_controller
Bump :( please help me i will pay you
|
Re: sentry turn to target using pev_controller
pev_controller_0 is horizontal angle.
Since you can specify from 0 to 360, it seems that you can calculate the value by the angle with the target + your own direction. However, the JGHG source is esoteric, so it behaved unnaturally when I tried. |
Re: sentry turn to target using pev_controller
Quote:
, my calculation is horrible when sentry see the target it turn to other locations yes JGHG code is esoteric maybe he can only help me with this :( |
Re: sentry turn to target using pev_controller
came up with.
1. Set all angles to 0 when deploying. 2. Find the angle between the turret and the target. (xs_vec_angle (turret, target), [1] in the array are both zero) 3. Set the angle to pev_controller_0. |
Re: sentry turn to target using pev_controller
okay thanks i will try
and i have find this code which do exactly what i wanted but problem is it is in module coding and i don't know how to apply in plugin . any way i will try your method :) PHP Code:
|
Re: sentry turn to target using pev_controller
|
All times are GMT -4. The time now is 13:45. |
Powered by vBulletin®
Copyright ©2000 - 2023, vBulletin Solutions, Inc.