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 … 11 12 13 14 15 … 18 Next »
SF Editor Bug + Plane intersection question
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Linear Mode
SF Editor Bug + Plane intersection question
04-10-2015, 11:09 PM,
#1
SuperPlayer Offline
TSCM Super Member
****
Posts: 234
Threads: 30
Joined: Oct 2014
SF Editor Bug + Plane intersection question
Hello!

I got a few problems with starfall again. First when i use the new day / night theme change it just changes the theme for half of the editor.
What i mean by that I am changing the the theme from Monokai to Chrome the editors color changes to white but the field where i enter the code keeps the Monokai theme.

Also i am trying to make a plane line intersect function for an emitter. But i keep getting this error:
sv: Player тѕсм.xXxANOxXx [GER] received error: SF:MF_Emitter.txt:73: attempt to call method 'Dot' (a nil value)

The functions I am using:

function Cursor()
LocalPlayer = ents.owner()
local Intersect = PlanLineIntersect( LocalPlayer:eyePos(), LocalPlayer:eyePos() + LocalPlayer:aimVector()*16800, Angles, Bridge:pos() + Bridge:getForward()*-60 + Bridge:getUp()*47 + Bridge:getRight()*190 )

render.setColor(255,0,0,255)
render.drawCircle(Intersect)
end

function PlanLineIntersect( lineStart, lineEnd, planeNormal, planePoint )
if lineStart == nil or lineEnd == nil or planeNormal == nil or planePoint == nil then error("Nil value") end
local t = planeNormalBig Grinot( planePoint - lineStart )/ planeNormalBig Grinot( lineEnd - lineStart )
return lineStart + t * ( lineEnd - lineStart )
end

--In the code Angles is:
Angles = Bridge:ang()
Angles:RotateAroundAxis( Bridge:right(), 90 )
Angles:RotateAroundAxis( Bridge:forward(), 90 )
Angles:RotateAroundAxis( Bridge:up(), 180 )

--And Bridge is:
ents.self:isWeldedTo()

Before that i wanted to use:
util.IntersectRayWithPlane( Vector rayOrigin, Vector rayDirection, Vector planePosition, Vector planeNormal ) 

But this doesnt exists in SF so is there another function like that?

[Image: banner_sgmgnlsa1.png]
Stargate Modding Group
Find
Reply
« Next Oldest | Next Newest »


Messages In This Thread
SF Editor Bug + Plane intersection question - by SuperPlayer - 04-10-2015, 11:09 PM
RE: SF Editor Bug + Plane intersection question - by TheOneAndOnlyTee - 05-10-2015, 12:05 AM
RE: SF Editor Bug + Plane intersection question - by SuperPlayer - 05-10-2015, 12:23 AM
RE: SF Editor Bug + Plane intersection question - by TheOneAndOnlyTee - 05-10-2015, 12:30 AM
RE: SF Editor Bug + Plane intersection question - by Person8880 - 05-10-2015, 05:36 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.