Team Spartan Cookies & Milk Forums
  • Issue Tracker
  • Donations
  • Search
  • Member List
  • Help

Register

Team Spartan Cookies & Milk Forums Garry's Mod Starfall v
« Previous 1 2 3 4 5 6 … 18 Next »
Holographic Ring Rotator?
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Linear Mode
Holographic Ring Rotator?
20-07-2020, 08:37 PM,
#4
pho Offline
once you go pho you never go back
***
Posts: 578
Threads: 82
Joined: Oct 2013
RE: Holographic Ring Rotator?
Seen in Cap code:


Code:
if (self.RingSpeed == 1) then self.Ring.Entity:SetKeyValue("maxspeed",30); elseif (self.RingSpeed == 2) then self.Ring.Entity:SetKeyValue("maxspeed",45); pitch = 102; elseif (self.RingSpeed == 3) then self.Ring.Entity:SetKeyValue("maxspeed",60); pitch = 106; elseif (self.RingSpeed == -1) then self.Ring.Entity:SetKeyValue("maxspeed",7.5); pitch = 93; else self.Ring.Entity:SetKeyValue("maxspeed",15); pitch = 95; end



used to set a rotating function on the ring
Code:
function ENT:AddRing() local pos = self.Entity:GetPos(); local e = ents.Create("func_rotating"); e:SetKeyValue("spawnflags",4 + 16); -- rotate around x-axis e:SetKeyValue("rendermode",10); -- dont draw,or the game crashes on touch e:SetKeyValue("maxspeed",30); e:SetKeyValue("friction",100);

from what i've read https://developer.valvesoftware.com/wiki/Func_rotating

Code:
Note: These formulas get called every 0.1 seconds. Purpose: Think function: Accelerates a func_rotating to a higher angular velocity. new_speed = fabs( current_speed ) + 0.2 * maxspeed * fanfriction; Purpose: Decelerates the rotator from a higher speed to a lower one. new_speed = fabs( current_speed ) - 0.1 * maxspeed * fanfriction;

So there's an acceleration from when the ring start rotating until it reached the specified max speed (in deg/s) taking 400ms to reach max speed

[Image: D3zUc4K.png]
Website Find
Reply
« Next Oldest | Next Newest »


Messages In This Thread
Holographic Ring Rotator? - by him - 19-07-2020, 11:22 PM
RE: Holographic Ring Rotator? - by The17thDoctor - 19-07-2020, 11:36 PM
RE: Holographic Ring Rotator? - by him - 20-07-2020, 06:07 PM
RE: Holographic Ring Rotator? - by pho - 20-07-2020, 08:37 PM

  • View a Printable Version
Forum Jump:


Users browsing this thread: 1 Guest(s)
Contact UsTeam Spartan Cookies & MilkReturn to TopLite (Archive) ModeMark all forums readRSS Syndication

Powered By MyBB, © 2002-2026 MyBB Group.