I scanned through and thought I recognised this. Simple but useful.
Edit:
Idea:
Loop through constrainted props, find the 5 heaviest, and apply stabalization to the 5 with the highest mass.
Gunna test something like this...
Code:@persist E:entity Ents:array Props:array if (first()) { E = entity() Ents = E:getConstraints() for (X = 1,Ents:count()) { Ents[X,entity]:setColor(255,255,255) for (Y = 0,5) { if (Ents[X,entity]:mass() > Props[Y,entity]:mass()) { if (!Props[5,entity]) { Props:pushEntity(Ents[X,entity]) break } } else { Props:remove(Y) Props:pushEntity(Ents[X,entity]) break } } } runOnTick(1) } for (Z = 1,5) { E = Props[Z,entity] E:setColor(vec(255,0,0)) E:applyAngForce(( -E:angles():setYaw(0)*20 - E:angVel())*E:mass()) # E:applyForce(( (-E:pos())*20 - E:vel())*E:mass()) }

Register
Events
Popular
More
Post #481




Bad Spelling x 1

Agree x 1
Informative x 1


