Whenever it comes time to manipulate vectors, whether it be for a dmodelpanel or some other shenanigans, its a game of trial and error for me, and that seems to be very ineffective. I don't really understand what my inputs are doing to my outputs, and can't seem to find any information on this in the wiki. Can anyone please take the time to explain the effects of me changing an x,y and z value in a vector change the outcome?
give an example of your code
[QUOTE=kulcris;49485792]give an example of your code[/QUOTE]
Not really sure how this pertains to my question.... I am simply asking for a link, or an explanation of vectors.
Litterly, whats the difference between:
[lua]
Vector(10,0,0)
Vector(0,10,0)
Vector(0,40,0)
[/lua]
Because if you change the "x" value enough, it will also have the same results as changing the "y" or "z".
What?
[IMG]http://vignette2.wikia.nocookie.net/gtawiki/images/1/15/Xyz.gif[/IMG]
That's how a vector's axis work, so I can't understand why you think x can equal y...
[QUOTE=john55223;49488940]
Because if you change the "x" value enough, it will also have the same results as changing the "y" or "z".[/QUOTE]
That's not how vectors work.
[lua]
playerModelDPanel:SetCamPos(Vector(x,y,z))
[/lua]
Well, what I don't understand is when I change vector, it also rotates the player model as well (depending on what values I change).
DModelPanel rotates the model its displaying, so changing x or y will have a similar effect.
[code]function PANEL:LayoutEntity( Entity )
--
-- This function is to be overriden
--
if ( self.bAnimated ) then
self:RunAnimation()
end
Entity:SetAngles( Angle( 0, RealTime() * 10 % 360, 0 ) )
end[/code]
[QUOTE=Mechanical Mind;49489196]DModelPanel rotates the model its displaying, so changing x or y will have a similar effect.
[code]function PANEL:LayoutEntity( Entity )
--
-- This function is to be overriden
--
if ( self.bAnimated ) then
self:RunAnimation()
end
Entity:SetAngles( Angle( 0, RealTime() * 10 % 360, 0 ) )
end[/code][/QUOTE]
I've already overridden that function. What I mean is, if I have the vector as
[lua]
Vector(75,0,65)
[/lua]
and I change it to
[lua]
Vector(75,0,10)
[/lua]
we will no longer be looking at the face of the model from directly in front of it, we will be looking at the face from feet level. So, we aren't just moving down on one axis, we are actually rotating and moving at the same time?
The camera will be set at CamPos and looking towards LookAt.
If you set the third argument of Vector (e.g. the Z coordinate) to 10 that is at foot height so you will be looking from the ground up at the LookAt (likely around the head)
Sorry, you need to Log In to post a reply to this thread.