Well. Chinoto helped me out to make a chip that floats above my head, spins, and attacks on crouch. I added setColor and setMaterial for looks but I wanted to make it orbit around my head sorta like a planet around the sun. I tried figuring it out and someone told me I need to know trig so i gave up. But i was wondering if anyone here could help me out.
and what value do i change so it goes faster when attacking?
E2 Code:
Code:
@name Craftons
runOnTick(1)
EE=entity() #Expression Entity
Owner=owner()
setMass(1000)
MyHeight=vec(0,0,125)
Target=(!Owner:isCrouch() ? Owner:pos()+MyHeight : Owner:aimPos())
applyForce(((Target-EE:pos())*10-EE:vel())*EE:mass())
applyAngForce((-(EE:angles()*5):setYaw(360*2)-EE:angVel())*EE:inertia():length()/sqrt(3))
EE:setColor(0,0,255)
EE:setMaterial("Models/Debug/Debugwhite")
Bookmarks