entity vector
[Edit] After playing around with it a lot I managed to fix and attain what I wanted. And I learned a valuable lesson in how to set entity angles :) [/Edit]
I just don't get this Code: entity_set_vector(ent, EV_VEC_angles, origin) okay so it has the entity, angles, then it gives it the float origin. Which contains the numbers for the x,y,z axis right? How does that calculate what angle the entity is at? O.o It just seems like there is an extra variable somewhere that I can't see. |
Re: entity vector
I do not know where you got that one from but it seems to be wrong?!
Because that would set an Entities angles by a Float Origin wouldn't it? @_@ For Origin it is: entity_set_vector(ent, EV_VEC_origin, origin) Or not? |
Re: entity vector
Gah, I'm trying to make the entity turn so that it 'aims' at an player (the origin)
>_< This is what I have, and it seems to work pretty well right now Note: I got this from the plugin Sentry Gun Code:
But it faces the opposite direction, all the time. |
Re: entity vector
So you wish entity_set_vector(ent, EV_VEC_angles, origin)
will make the Entity "ent" look at the given Origin? One word: No. It actually sets the Entities ("ents"'s) angles like defined in last parameter. The Code you just posted will make an Entity ('ent') look at something ('target'). |
Re: entity vector
gah, the initial question was, define how "origin" effects "entity_set_vector(ent, EV_VEC_angles, origin)"
Like if you alter origin[1] what should/would happen to the angles. |
Re: entity vector
Quote:
|
Re: entity vector
after playing around I found out that the first number in the Origin array used int he angles actually alters the entities pitch (looking up and down), the second number alters the rotation (left and right) and the third number is the tilt (leaning left and right)
so the Code:
gah, :( |
Re: entity vector
The whole task can be done quite simple, take a look
Code:
|
Re: entity vector
Quote:
|
Re: entity vector
EDIT:
And to make it aiming (for player) you have to set angle in the v_angle pev (not angles pev). Basically if you have an origin: Quote:
|
| All times are GMT -4. The time now is 04:47. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.