3 if-statments, one for each axis, is the "only" way right now I guess.
What do you need it for anyway?
Im trying to get the largest component of a vector and return it in a vector form
eg. vec(1,2,3) would turn into vec(0,0,3)
I am aware of max(V:x(),V:y(),V:z()) thats not what i want though.
How do i do this?
A-Z Materials - Released!!!!!!!
3 if-statments, one for each axis, is the "only" way right now I guess.
What do you need it for anyway?
Scaling a Hologram between two points
A-Z Materials - Released!!!!!!!
Scaling between two points is a bit... vague.
If you need the first option, then you can make the height equal the distance between AB, create the holo at (A+B)/2 and make the holoangle (A-B):toAngle().Code:A\ \ \ \ \ \ \ \ \ \ \ \ \ \B A /\ / \ / \ / \ / \ / \B """"""""""""
first option. I used mix(V1,V2,0.5) for the position. Haven't tried the angular part though.
Last edited by ahref; 07-27-2009 at 07:54 AM.
A-Z Materials - Released!!!!!!!
Pulled this out of an E2 I'm working on:
HoloAng=(VectorB-VectorA):toAngle()
HoloPos=(VectorB+VectorA)/2
HoloLength=VectorB:distance(VectorA)
holoCreate(1,HoloPos,vec(),HoloAng,vec(255,0,0))
holoScaleUnits(1,vec(HoloLength,2,2))
it was only the angle part i needed afterall. I was using atanr :S
A-Z Materials - Released!!!!!!!
Bookmarks