I been messin about tryin to get this to work for a couple days now and failed since I'm an expression 2 noob looked at a few different sites and found some code to help me but my main problem now is that this code causes the roll to be stabilized aswell and i need that to be free to enable turning during flight so does anybody know how i can alter this code to make that possible:
@name Force Test
runOnTick(1)
Temp=entity(),Entity=(Temp:getConstraints():count() > 0 ? Temp:isWeldedTo() : Temp)
Angle=-Entity:angles()*15-Entity:angVel()*2
Center=Entity:massCenter(),Right=Entity:right(),Forward=Entity:forward(),Up=Entity:up()
Entity:applyForce((vec(0,0,9.015)-Entity:vel())*Entity:mass())
Leverage=Entity:inertia():length()
Entity:applyAngForce(Angle*Leverage)
[code]
@name Force Test
@inputs Stabilize
runOnTick(1)
Temp=entity(),Entity=(Temp:getConstraints():count( ) > 0 ? Temp:isWeldedTo() : Temp)
Angle=-Entity:angles()*15-Entity:angVel()*2
Center=Entity:massCenter(),Right=Entity:right(),Fo rward=Entity:forward(),Up=Entity:up()
Entity:applyForce((vec(0,0,9.015)-Entity:vel())*Entity:mass())
Leverage=Entity:inertia():length()
if(Stabilize) {Entity:applyAngForce(Angle*Leverage)}
[/code]
Will only stabilize if stabilize input = 1
thanks for the suggestion it was actually Yaw i need to be able to alter just realised lol fail me i know this code lets me do that but i need roll and pitch to still be stabilized while i alter the yaw anyway of doing this
Sorry, you need to Log In to post a reply to this thread.