Hey it's me again,
I'm currently performing a "confuse yourself, build stuff" project which is meant to last about a week. As such i built a hoverplatform today. After about 6 hours of being confused now i only have one question left. The coloured part makes my platform turn, however it only turns by the entered amount and not further, i want it do to something like:
0 + 45 = 45
45 + 45 = 90
(I'd use smaller values then)
It'd also be nice if the platform kept the value afterwards
A big box of cookies for the first one to deliver me a useful answerCode:@inputs Numpad Active RightRoll LeftRoll Right Left PitchForward PitchBackward Space Num5 @outputs Plateforward:vector Gyro:angle @persist V:vector interval(10) Plate = entity() Me = owner() P = Plate:angles():pitch() Y = Plate:angles():yaw() R = Plate:angles():roll() V = (Me:pos() - Plate:pos() + vec(0,0,-22)) * 500 Plateforward = Plate:forward() if(Active == 1){ if(Space == 1){Plate:applyForce(Plateforward * 100)} if(Num5 == 1){Plate:applyForce(-Plateforward * 100)} if(Right == 1){Y = Y + 90} if(Left == 1){Y = Y - 90} if(RightRoll == 1){R = R + 45} if(LeftRoll == 1){R = R - 45} if(PitchForward == 1){P = P + 45} if(PitchBackward == 1){P = P - 45} Gyro = -ang(P,Y,R) * 100 Plate:applyAngForce(Gyro + $Gyro * 5) } if(Numpad == 1){Plate:applyForce( V + $V * 5)}
advance payment:![]()


LinkBack URL
About LinkBacks





Reply With Quote
itch()




Bookmarks