I've seen people making props follow the same position as their head, like a cone hat or giant head made with multiple props. Could somebody please give me the E2 code required to do this, if it's not too much to ask?
I've seen people making props follow the same position as their head, like a cone hat or giant head made with multiple props. Could somebody please give me the E2 code required to do this, if it's not too much to ask?
Last edited by Quantum; 04-10-2009 at 05:11 PM. Reason: Why can't I change the title?
We'll help you... but were not going to just outright give you code. I'd suggest getting familiar with the applyForce and applyOffsetForce functions. Basically you take the position of said object as a vector and subtract from that the position where you WANT it to be (ie over your head).
[ame=http://www.facepunch.com/showthread.php?t=707796]Bubble Buddy! - Facepunch[/ame]
Just spawn one of those and look at the code. I assume that's what you're looking for?
make a turret pointing at were are u looking and make it hover above ur head using gps
its not that hard
Is it Bad to be Good or Good to be Bad?
Sorry for my bad English
Spawn this on several props, one each. Then see the resultCode:@name Imperial Hat @inputs @outputs @persist A:vector B:vector Ang interval(10) E = entity() A = E:pos() C = E:owner():pos() Att = E:isWeldedTo() B= C + 100*( vec(cos(Ang), sin(Ang), 0)) Ang+=2 #C = -(A - B+($A*30)-$B*30 + vec(0,0,-200))*5 C = ( B + $B*75 -A - $A*75 + vec(0,0,200) )*Att:mass()/10 applyForce( C )
Give me rep if I helped you
CAPS LOCK IS CRUISE CONTROL FOR AWESOME
How The Clocks at Valve Work
Gpu Problem? Refer to This!
CLICK HERE TO MAKE A HELP THREAD
GENERATION 7: The first time you see this, copy it into your sig on any forum and add 1 to the generation.
Social experiment.
Thank you.
[D3] Coffeelord
Bookmarks