View Poll Results: What should I do?

Voters
21. You may not vote on this poll
  • Change R:position() to work like Lua's and create the two new LeftSolid functions for E2.

    12 57.14%
  • Leave it as it is and don't create the two new functions.

    3 14.29%
  • Leave it as it is and create 1 new function which returns the hit position like Lua (Possibly naming it R:pos())

    6 28.57%
+ Reply to Thread
Page 1 of 2 12 LastLast
Results 1 to 10 of 14

Thread: [E2] Built-in ranger changes?

  1. #1
    No u Divran's Avatar
    Join Date
    Jul 2008
    Location
    Sweden
    Posts
    4,582

    Default [E2] Built-in ranger changes?

    I noticed there are a lot of more data you can get out of a ranger trace which isn't accessible through E2.

    I've already made these and they will be committed:
    • ranger:fraction()
    • ranger:hitSky()
    • ranger:hitWorld()
    • ranger:matType()
    • ranger:toTable()
    • ranger:hitGroup()

    I'm going to make these:
    • None atm. They have all been made See above

    I'm thinking of making these:
    • ranger:fractionLeftSolid()
    • ranger:positionLeftSolid()

    And I'm having compatibility issues with these:
    • ranger:position() and ranger:fractionLeftSolid()/ranger:leftSolidPosition()
      Currently, ranger:position() returns the position where it leaves the solid area if it was created inside a solid area. (By solid, I mean the world. Props don't count)
      This, however, makes fractionLeftSolid and leftSolidPosition pointless. Therefore, I'm considering changing ranger:position() so that it returns the hit position like Lua does (ie if the ranger starts in the world, and exits the solid brush, continues on, and hits another solid face, it should return THAT hit position. That's how the regular Lua traces work). I can then add the other two functions and they will then have a purpose.


    The reason I'm posting this is for you to discuss and suggest what you think should be done about this/these compatibility issues (By compatibility issues I'm referring to the fact that old E2s may break). Also created a poll.

    EDIT: Also, here's the Gmod Wiki page which explains what all of these things do: http://wiki.garrysmod.com/?title=Traceres

    EDIT: REMEMBER it will only be a compatibility problem for old E2s who need to scan the ground (for simple obstacle - gaps/chasms in this case - avoidance or similar), because it only affects traces which were started inside the world and exits it.
    Last edited by Divran; 08-18-2010 at 02:11 PM.
    SVN Tutorial
    My SVN:
    Code:
    http://divranspack.googlecode.com/svn/trunk/%20divranspack/
    Get dropbox and get 250 MB extra space: Dropbox

  2. #2
    Wire Amateur Spoon God's Avatar
    Join Date
    Jul 2009
    Posts
    87

    Default Re: [E2] Built-in ranger changes?

    E2 Rangers are awesome...this is good!
    If you're worried about old E2s breaking with ranger:fractionLeftSolid()/ranger:leftSolidPosition() you should just make another function that does what you were thinking of making ranger:position() do. Something like ranger:forceHitPos() or ...i don't know, ranger:position2()...or maybe even ranger:pos() since it DOESN'T EXIST YET! >_<
    Maybe a ranger:bounce() would be useful, which would return a direction vector facing how the ranger would bounce off where it hit (as though it were a laser hitting a mirror)

    EDIT:
    If you decide to use ranger:fractionLeftSolid()/ranger:leftSolidPosition() anyway, my vote goes to using ranger:leftSolidPosition()
    (Ragdoll Keyframer) (Awesome Heads) (Fish Tank) (Virtual Fish Pond) (Fishing Rod) (Crap) (Sparkle) (Airboat Tank V2.0) (Balls of Rubber V2.0) (Bomb Truck) (Nuke Cannon) (Jet)
    If my computer is online, you can see all my new stuff at my E2 page.

  3. #3
    aka Colonel Never Online Colonel Thirty Two's Avatar
    Join Date
    Oct 2009
    Posts
    2,683
    Blog Entries
    5

    Default Re: [E2] Built-in ranger changes?

    Don't think you need RD:hitNonWorld unless it does not equal !RD:hitWorld()

  4. #4
    No u Divran's Avatar
    Join Date
    Jul 2008
    Location
    Sweden
    Posts
    4,582

    Default Re: [E2] Built-in ranger changes?

    Quote Originally Posted by initrd.gz View Post
    Don't think you need RD:hitNonWorld unless it does not equal !RD:hitWorld()
    I'm not sure, but it's possible it does equal !hitWorld.
    SVN Tutorial
    My SVN:
    Code:
    http://divranspack.googlecode.com/svn/trunk/%20divranspack/
    Get dropbox and get 250 MB extra space: Dropbox

  5. #5
    Wire Sofaking Grocel's Avatar
    Join Date
    Mar 2008
    Location
    Germany, NRW, Remscheid
    Posts
    751

    Default Re: [E2] Built-in ranger changes?

    A ranger always fires from the e2 unless some thing else is set with rangerOffset(V,V).

    If I want to fire a ranger from a entity else then the e2 is quite annoying to set it up with rangerOffset and the E:pos() stuff, because with E:pos() it doesn't work because the ranger trace, will be blocked by the E entity used by E:pos().

    So can we get a RD = E:ranger(N) function?
    I would be like ranger(N) but instant of the e2 entity it uses a another entity.

    And can you make us able to do some thing like RD:start(V) and RD:end(V), this changes the start and the end of the ranger trace, it would be useful.
    Quote Originally Posted by Wizard of Ass View Post
    The secret phrase in gmod is: Rusty bullet hole
    Im a molecule!

  6. #6
    No u Divran's Avatar
    Join Date
    Jul 2008
    Location
    Sweden
    Posts
    4,582

    Default Re: [E2] Built-in ranger changes?

    E:ranger(N) is certainly possible, but
    Quote Originally Posted by Grocel View Post
    And can you make us able to do some thing like RD:start(V) and RD:end(V), this changes the start and the end of the ranger trace, it would be useful.
    this would mean you retrace again every time you change the start or end... thus it's useless because you may as well run another rangerOffset with new arguments.
    SVN Tutorial
    My SVN:
    Code:
    http://divranspack.googlecode.com/svn/trunk/%20divranspack/
    Get dropbox and get 250 MB extra space: Dropbox

  7. #7
    Wire Sofaking Grocel's Avatar
    Join Date
    Mar 2008
    Location
    Germany, NRW, Remscheid
    Posts
    751

    Default Re: [E2] Built-in ranger changes?

    Quote Originally Posted by Divran View Post
    E:ranger(N) is certainly possible
    Nice.

    Quote Originally Posted by Divran View Post
    this would mean you retrace again every time you change the start or end... thus it's useless because you may as well run another rangerOffset with new arguments.
    Oh, I didn't know, nevermind. ^_^
    Quote Originally Posted by Wizard of Ass View Post
    The secret phrase in gmod is: Rusty bullet hole
    Im a molecule!

  8. #8
    No u Divran's Avatar
    Join Date
    Jul 2008
    Location
    Sweden
    Posts
    4,582

    Default Re: [E2] Built-in ranger changes?

    Bump
    I've added another option to the poll which I thought should work.
    Last edited by Divran; 08-18-2010 at 12:28 PM.
    SVN Tutorial
    My SVN:
    Code:
    http://divranspack.googlecode.com/svn/trunk/%20divranspack/
    Get dropbox and get 250 MB extra space: Dropbox

  9. #9
    hurrr physics Tolyzor's Avatar
    Join Date
    Aug 2008
    Location
    England
    Posts
    1,019

    Default Re: [E2] Built-in ranger changes?

    Do any of these give a hit water output?

    Another thing that would be useful (but is likely not possible) would be a leaveObject() output, so that if the trace is started inside a prop, or underwater, it returns the position where it leaves the object.
    Comprehensive Gmod physics guide - Ballistic trajectory with drag - Autodyno engine performance test
    Quote Originally Posted by janvos2506 View Post
    i just going to type the code over and over again and maybe il remeber it then
    Don't make the mistake these skydivers did and use any of my Gmod physics models for real life situations...

  10. #10
    No u Divran's Avatar
    Join Date
    Jul 2008
    Location
    Sweden
    Posts
    4,582

    Default Re: [E2] Built-in ranger changes?

    I made a hitWater ranger function using pointContents, but you can now just use the matType function (returns "slosh" )

    Don't think it's possible to make a function that returns the position where it left the (non-world) object, without making it expensive
    SVN Tutorial
    My SVN:
    Code:
    http://divranspack.googlecode.com/svn/trunk/%20divranspack/
    Get dropbox and get 250 MB extra space: Dropbox

+ Reply to Thread
Page 1 of 2 12 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
proceed-collector
proceed-collector
proceed-collector
proceed-collector
linguistic-parrots
linguistic-parrots
linguistic-parrots
linguistic-parrots