1. Post #761
    Gold Member
    MrWhite's Avatar
    March 2010
    3,520 Posts
    my wheel code runs at an interval of 100 without any problems whatsoever. I've been working on a rewrite that includes optional movement smoothing, Angle adjustment, a crude form of predictive (not really) motion adjustment, and a bit of proper code writing and optimization. I'm predicting <20ops with any luck, though I'm willing to let it get to 40 before I cut down on features.
    Reply With Quote Edit / Delete Windows 7 United States Show Events Optimistic Optimistic x 1 (list)

  2. Post #762
    neolite's Avatar
    November 2007
    88 Posts
    I've noticed that people are still using props for steering wheels, or are using straight default holograms to do it. I can't stand this, so I wrote a bit of code that might inspire some people.
    Code:
    @name basic E2 Steering Wheel
    @inputs Steering:entity
    @persist Model:string Ratio Angle
    
    interval(100)
    
    Model="models/steeringwheels/truckwheel.mdl"
    Ratio=5
    
    if(first()){
    holoCreate(1)
    holoModel(1,Model)
    holoPos(1,entity():toWorld(vec(0,0,10)))
    holoParent(1,entity())
    }
    
    holoAng(1,entity():toWorld(ang(A,90,0)))
    
    Angle=entity():isWeldedTo():angles():yaw()-Steering:angles():yaw()
    I know it's dirty. Sue me.

    The ratio value controls the angle amplification between the steering wheel and the steering master. Unless you use the wheels from the Steering Wheel Pack and a PHX bar for the steering master, you'll probably have to play with the angles a bit.

    I don't know a whole lot about controlling hologram angles properly, so I couldn't quite figure out how to get the wheel at the proper angle, so users will have to set the angle manually by placing the E2. I wanted to have a steering wheel angle and depth adjuster, which would have been cool, but I just don't know enough yet. Enjoy.
    Code:
    @name basic E2 Steering Wheel
    @inputs Steering:entity
    @persist Model:string Ratio Angle
    
    interval(20)
    
    Model="models/steeringwheels/truckwheel.mdl"
    Ratio=5
    
    if(first()){
    holoCreate(1)
    holoModel(1,Model)
    holoPos(1,entity():toWorld(vec(0,0,10)))
    holoParent(1,entity())
    }
    
    holoAng(1,entity():toWorld(ang(90,Angle,0)))
    
    Angle=entity():isWeldedTo():angles():yaw()+Steering:angles():yaw()
    I fixed it, still no model shows. It's just a holocube, tried changing models, no effect. The code you wrote was kinda wrong, sure it was following the slave, but it was TILTING left and right(If you look to north) instead of just yawing(turning) if you know what i mean. Now i edited it so it turns to the slave correctly, so you can just place the chip on the dashboard.
    Reply With Quote Edit / Delete Windows 7 Sweden Show Events Useful Useful x 1 (list)

  3. Post #763
    Flyingtaco's Avatar
    August 2010
    43 Posts
    Kiwi has obviously never heard of holoParent. Additionally, you can persist Base and set it in the first statement.
    Reply With Quote Edit / Delete Windows Vista United States Show Events Optimistic Optimistic x 1 (list)

  4. Post #764
    ItWasNiceToKnow's Avatar
    July 2009
    1,245 Posts
    thats what she said
    Reply With Quote Edit / Delete Windows 7 Denmark Show Events Dumb Dumb x 4Late Late x 1 (list)

  5. Post #765
    neolite's Avatar
    November 2007
    88 Posts
    Meh beybe haz dun a new paint job!





    rate plox
    Reply With Quote Edit / Delete Windows 7 Sweden Show Events Optimistic Optimistic x 4Friendly Friendly x 2Winner Winner x 2Dumb Dumb x 1 (list)

  6. Post #766
    Gold Member
    MrWhite's Avatar
    March 2010
    3,520 Posts
    Code:
    @name basic E2 Steering Wheel
    @inputs Steering:entity
    @persist Model:string Ratio Angle
    
    interval(20)
    
    Model="models/steeringwheels/truckwheel.mdl"
    Ratio=5
    
    if(first()){
    holoCreate(1)
    holoModel(1,Model)
    holoPos(1,entity():toWorld(vec(0,0,10)))
    holoParent(1,entity())
    }
    
    holoAng(1,entity():toWorld(ang(90,Angle,0)))
    
    Angle=entity():isWeldedTo():angles():yaw()+Steering:angles():yaw()
    I fixed it, still no model shows. It's just a holocube, tried changing models, no effect. The code you wrote was kinda wrong, sure it was following the slave, but it was TILTING left and right(If you look to north) instead of just yawing(turning) if you know what i mean. Now i edited it so it turns to the slave correctly, so you can just place the chip on the dashboard.
    Code:
    @name basic E2 Steering Wheel
    @inputs Steering:entity
    @persist Model:string Ratio Angle
    
    interval(100)
    
    Model="models/steeringwheels/lambowheel.mdl"
    Ratio=1
    
    if(first()){
    holoCreate(1)
    holoModel(1,Model)
    holoPos(1,entity():toWorld(vec(0,0,10)))
    holoParent(1,entity())
    }
    
    holoAng(1,entity():toWorld(ang(Angle*Ratio,90,0)))
    
    Angle=entity():isWeldedTo():angles():yaw()+Steering:angles():yaw()
    I had no problems with this code here. I get no tilting effect you describe. To get the model to show, you need to have the Steering Wheel Model Pack, Wiremod Extras, and the concmd "wire_holograms_modelany" activated. Your changes ended up increasing the opcount to the low 50s, as opposed to mid 10s. Not really a"fix".
    Reply With Quote Edit / Delete Windows 7 United States Show Events Optimistic Optimistic x 1 (list)

  7. Post #767
    One Ear Ninja's Avatar
    November 2009
    2,072 Posts
    post your current steering wheel code v3
    Reply With Quote Edit / Delete Windows 7 United States Show Events Funny Funny x 1Optimistic Optimistic x 1Agree Agree x 1 (list)

  8. Post #768
    neolite's Avatar
    November 2007
    88 Posts
    Yea no, just realized I did no "fix" at all, sorry. I have all those stuffs except that command activated.
    Might wanna tell people to activate that command when releasing the code, since noone has it activated as default (atleast I didn't). I had no clue, I might just be retarded.

    Also, Facepunch is doing trickz with your minds. Can't trust it anymore!


    Edit: I didn't get your edit, but it came up when i pressed reply. Wasn't that funny anymore.
    Reply With Quote Edit / Delete Windows 7 Sweden Show Events Optimistic Optimistic x 2 (list)

  9. Post #769
    Gold Member
    MrWhite's Avatar
    March 2010
    3,520 Posts
    yeah, I ended up editing the post about 4 times in 1 and a half minutes, so FP might have gotten confused. When I first posted the code, I forgot that it needed a command.

    Anyways, I just wanted a nice little 1 hologram steering wheel E2 that worked properly and was simple to use. i found it simple to use and effective, so I figured I might as well let everyone else have it.

    Damn, I'm rereading all my posts and I sound like an arrogant douchebag reading them to myself.
    Reply With Quote Edit / Delete Windows 7 United States Show Events Optimistic Optimistic x 1 (list)

  10. Post #770
    Dennab
    June 2010
    2,040 Posts


    Damn, I'm rereading all my posts and I sound like an arrogant douchebag reading them to myself.
    I hate when that happens to me.
    Reply With Quote Edit / Delete Windows 7 United States Show Events Funny Funny x 8 (list)

  11. Post #771
    neolite's Avatar
    November 2007
    88 Posts



    I hate when that happens to me.
    HAHAHAH the pic gave me a good laugh!
    Reply With Quote Edit / Delete Windows 7 Sweden Show Events Disagree Disagree x 4Friendly Friendly x 1 (list)

  12. Post #772
    One Ear Ninja's Avatar
    November 2009
    2,072 Posts
    ah, steering wheel drama
    Reply With Quote Edit / Delete Windows 7 United States Show Events Funny Funny x 1 (list)

  13. Post #773
    Dennab
    June 2010
    2,040 Posts
    thread needs more drama
    I've had a few people ask me how to do this. It's not hard, it gets rid of the wheel2 wobbles.
    Reply With Quote Edit / Delete Windows 7 United States Show Events Informative Informative x 2 (list)

  14. Post #774
    skeligandrew's Avatar
    May 2011
    873 Posts
    Since I'm too lazy and unmotivated to make full contraptions I'm just making small gizmos. I can attach this w/ or w/o roadwheels, wire & scale it, and boom, tank tracks. Pretty much anyone could use it.
    You gonna release that? :O
    Reply With Quote Edit / Delete Windows 7 United Kingdom Show Events Agree Agree x 1 (list)

  15. Post #775
    Dennab
    June 2010
    2,040 Posts
    You gonna release that? :O
    when i get all the bugs ironed out. It still has one part not in the vid that acts weird occasionally at certain angles.

    Actually it's better on a normal contraption than this, this is a shitty example, I was driving around a hl2 vehicle so the physics is all weird.
    Edited:
    Told you so.
    Reply With Quote Edit / Delete Windows 7 United States Show Events Winner Winner x 6Artistic Artistic x 1 (list)

  16. Post #776
    Quality over quantity.
    Unslinga's Avatar
    August 2010
    880 Posts
    thread needs more drama
    I've had a few people ask me how to do this. It's not hard, it gets rid of the wheel2 wobbles.
    This is pretty much the same as I've done for ages except that I use Precision Alignment instead because it allows me to have the absolute center of the prop instead of it being off-center.
    Reply With Quote Edit / Delete Windows 8 Norway Show Events Optimistic Optimistic x 1 (list)

  17. Post #777
    neolite's Avatar
    November 2007
    88 Posts
    Alright, time for more WIP. T-truck! Not done yet, still has some work to do, but the suspension is great.
    The paint seems to horrible though.
    BAJA 2012 @ Garrysmod, yup.. bring it.



    This picture below was without springs.

    Reply With Quote Edit / Delete Windows 7 Sweden Show Events Artistic Artistic x 2Optimistic Optimistic x 1 (list)

  18. Post #778
    Dennab
    June 2010
    2,040 Posts
    This is pretty much the same as I've done for ages except that I use Precision Alignment instead because it allows me to have the absolute center of the prop instead of it being off-center.
    I don't remember how to make PA do that, use one prop's masscenter attaching to another prop. If I did I'd do that myself, though the tut was for people who don't use PA anyway. Oh well.
    Reply With Quote Edit / Delete Windows 7 United States Show Events

  19. Post #779
    Quality over quantity.
    Unslinga's Avatar
    August 2010
    880 Posts
    I don't remember how to make PA do that, use one prop's masscenter attaching to another prop. If I did I'd do that myself, though the tut was for people who don't use PA anyway. Oh well.
    If I have any time after next weekend I might make a tutorial on it. I already promised a lot of people to make a suspension tutorial.
    Reply With Quote Edit / Delete Windows 8 Norway Show Events Friendly Friendly x 1 (list)

  20. Post #780
    One Ear Ninja's Avatar
    November 2009
    2,072 Posts
    Masscenter to edge is like one of the easiest things to do with PA, dude
    Reply With Quote Edit / Delete Windows 7 United States Show Events

  21. Post #781
    Gold Member
    Balto-the-Wolf-Dog's Avatar
    June 2009
    1,817 Posts
    when i get all the bugs ironed out. It still has one part not in the vid that acts weird occasionally at certain angles.

    Actually it's better on a normal contraption than this, this is a shitty example, I was driving around a hl2 vehicle so the physics is all weird.
    Edited:
    Told you so.
    Damn red, that's awesome. How many ops?
    Reply With Quote Edit / Delete Windows 7 United States Show Events

  22. Post #782
    Dennab
    June 2010
    2,040 Posts
    Damn red, that's awesome. How many ops?
    Averages around 230. It's on hold though, since somehow wire broke rangerFilter() and rangerHitEntites(0) and now I am rage.
    Edited:
    I might end up having to recode half of it just because of that, basically changing the way it works from the ground up. FUCK.
    Reply With Quote Edit / Delete Windows 7 United States Show Events

  23. Post #783
    Gold Member
    Balto-the-Wolf-Dog's Avatar
    June 2009
    1,817 Posts
    Averages around 230. It's on hold though, since somehow wire broke rangerFilter() and rangerHitEntites(0) and now I am rage.
    Edited:
    I might end up having to recode half of it just because of that, basically changing the way it works from the ground up. FUCK.
    Eh, hold off a bit. Wire generally isn't bad in turning those issues around pretty quickly. Also, that's much cheaper than I ever imagined.
    Reply With Quote Edit / Delete Windows 7 United States Show Events Friendly Friendly x 1 (list)

  24. Post #784
    skeligandrew's Avatar
    May 2011
    873 Posts
    I have found the epicentre of gmod scrubs, http://www.reddit.com/r/gmod/

    I have sybscribed to that subreddit in the facking hopes someone on there ISN'T A RAGDOLL POSING 12 YEAR OLD,
    They see an airboat painted rust colour and wings on it and they BEG for a dupe holy shit I want to nuke this community, set it on fire. Everything I have posted gets no votes but funny enough I don't think it gets posted as it is all filtered ragdoll BOOSHET

    damn damn rant over This really rustled my jimmies

    http://imgur.com/a/9ScAE/ wow man sweet ride..

    http://imgur.com/a/LFK5X AWESUM
    Reply With Quote Edit / Delete Windows 7 United Kingdom Show Events Dumb Dumb x 1 (list)

  25. Post #785
    One Ear Ninja's Avatar
    November 2009
    2,072 Posts
    I want to see a reddit gmod server
    Reply With Quote Edit / Delete Windows 7 United States Show Events Disagree Disagree x 1 (list)

  26. Post #786

    August 2010
    12 Posts





    Ferdinand Full working :3

    100mm gun with a max penetration of 173 mm

    20max Mph

    Realistic armor :3
    Reply With Quote Edit / Delete Windows 7 Italy Show Events Winner Winner x 3Artistic Artistic x 1 (list)

  27. Post #787
    Dennab
    June 2010
    2,040 Posts
    Ferdinand Full working :3
    that came out very nice!!

    Eh, hold off a bit. Wire generally isn't bad in turning those issues around pretty quickly. Also, that's much cheaper than I ever imagined.
    I'll put in a trouble ticket I guess. There's a workaround I haven't tried, offset the tracing around the roadwheels and then shifting the vectors, so not all is lost. And thanks. I tried to make them something that we could realistically see on all tanks as standard in time.
    Reply With Quote Edit / Delete Windows 7 United States Show Events

  28. Post #788
    Quality over quantity.
    Unslinga's Avatar
    August 2010
    880 Posts
    Masscenter to edge is like one of the easiest things to do with PA, dude
    Yeah, I know that, but who in their right mind would make a tutorial about that. I'm talking about setting custom positioning and using constraints, advanced mirroring and shit like that that most people don't know how to do.
    Reply With Quote Edit / Delete Windows 8 Norway Show Events

  29. Post #789
    unrezt's Avatar
    August 2009
    1,124 Posts
    It's on hold though, since somehow wire broke rangerFilter() and rangerHitEntites(0) and now I am rage.
    There is nothing wrong with rangerFilter() or rangerHitEntities(). Are you sure you are using them correctly? How are you getting the array of entities to filter? Are you using rangerPersist(1)? Are you persisting other variables correctly?

    You should be doing something like this

    Code:
    if (first())    {
        E = entity()
        
        C = entity():getConstraints()
        
        rangerFilter(C)
        rangerPersist(1)
        runOnTick(1)
    }
    Add any other entities you want to filter to the array using C:pushEntity(entity()).
    Reply With Quote Edit / Delete Windows 7 United States Show Events

  30. Post #790
    One Ear Ninja's Avatar
    November 2009
    2,072 Posts
    Yeah, I know that, but who in their right mind would make a tutorial about that. I'm talking about setting custom positioning and using constraints, advanced mirroring and shit like that that most people don't know how to do.
    Ah, PA constraints are fun. They are like the best thing ever for creating and updating suspension on cars.
    Reply With Quote Edit / Delete Windows 7 United States Show Events

  31. Post #791
    duurb3l's Avatar
    August 2008
    92 Posts



    Some truck wip
    Reply With Quote Edit / Delete Windows Vista Switzerland Show Events Artistic Artistic x 2Winner Winner x 1 (list)

  32. Post #792
    Hell0's Avatar
    January 2012
    481 Posts



    Some truck wip
    What wheels are those?
    Reply With Quote Edit / Delete Windows 7 Finland Show Events

  33. Post #793
    unrezt's Avatar
    August 2009
    1,124 Posts
    What wheels are those?
    A shitty wheel pack I made, which tbh I am surprised people actually use.

    http://www.garrysmod.org/downloads/?a=view&id=121590
    Reply With Quote Edit / Delete Windows 7 United States Show Events Winner Winner x 1 (list)

  34. Post #794
    neolite's Avatar
    November 2007
    88 Posts
    A shitty wheel pack I made, which tbh I am surprised people actually use.

    http://www.garrysmod.org/downloads/?a=view&id=121590
    Shitty? No. You should do some more wheels! A huge wheel pack would be much appreciated!

    Edit: A new funny project, was bored so I thought why not? Works great in high speed, just a bit of a turn issue. Oversteers and flips over, fixed it but still horrible turning.

    Reply With Quote Edit / Delete Windows 7 Sweden Show Events Funny Funny x 4Artistic Artistic x 1 (list)

  35. Post #795
    Hell0's Avatar
    January 2012
    481 Posts
    A shitty wheel pack I made, which tbh I am surprised people actually use.

    http://www.garrysmod.org/downloads/?a=view&id=121590
    They look pretty good to me.
    Reply With Quote Edit / Delete Windows 7 Finland Show Events

  36. Post #796
    Dennab
    June 2010
    2,040 Posts
    There is nothing wrong with rangerFilter() or rangerHitEntities(). Are you sure you are using them correctly? How are you getting the array of entities to filter? Are you using rangerPersist(1)? Are you persisting other variables correctly?

    You should be doing something like this

    Code:
    if (first())    {
        E = entity()
        
        C = entity():getConstraints()
        
        rangerFilter(C)
        rangerPersist(1)
        runOnTick(1)
    }
    Add any other entities you want to filter to the array using C:pushEntity(entity()).
    got it. accidentally left a # in front of rangerPersist(1) lol


    To do:
    -Attempt to add a rotation function for other optional textures (since some of the textures are different directions)
    -Add a slack track feature
    -Try to cut op count down to 150
    -Make the coloring system a bit easier (right now it's just stuck at a default color)
    -Possibly add built-in sound effects
    -Beta test on standard tanks (probably gonna get help on this)

    Also your wheel pack is very good unrezt

    Edited:

    Edit: A new funny project, was bored so I thought why not? Works great in high speed, just a bit of a turn issue. Oversteers and flips over, fixed it but still horrible turning.

    nice! You could have the rear axle on hydraulics so it keeps the body to the proper angle...ther'es a top gear floating around where Jeremy drove a 3-wheeler that does that but I can't find it.
    Reply With Quote Edit / Delete Windows 7 United States Show Events

  37. Post #797
    unrezt's Avatar
    August 2009
    1,124 Posts
    Being holograms, you could probably get away with using intervals as high as 90 without noticing any differences; I know for my inverse kinematics I use 45 and it cuts the ops down by like 300% with no change in appearance.
    Reply With Quote Edit / Delete Windows 7 United States Show Events

  38. Post #798
    Needs more suspension.
    Dennab
    February 2006
    4,484 Posts
    nice
    Reply With Quote Edit / Delete Windows 7 United States Show Events Friendly Friendly x 1 (list)

  39. Post #799
    Dennab
    June 2010
    2,040 Posts
    Being holograms, you could probably get away with using intervals as high as 90 without noticing any differences; I know for my inverse kinematics I use 45 and it cuts the ops down by like 300% with no change in appearance.
    so far a tickrate of 175 has worked wonderfully and kept ops down to the mid 150s. The video was posted with a tickrate of 125 and ran around 200 ops.

    also this thread needs more dragons.
    Reply With Quote Edit / Delete Windows 7 United States Show Events Friendly Friendly x 1 (list)

  40. Post #800
    unrezt's Avatar
    August 2009
    1,124 Posts
    so far a tickrate of 175 has worked wonderfully and kept ops down to the mid 150s. The video was posted with a tickrate of 125 and ran around 200 ops.

    also this thread needs more dragons.
    Heh, sort of gave up on that. IK gets very complicated when you go past two segments(dragon legs are 3 segment digitigrade).
    Reply With Quote Edit / Delete Windows 7 United States Show Events Informative Informative x 2 (list)