Jump to content
SirChick

How does CS mouse over/select a road segment?

4 posts in this topic Last Reply

Highlighted Posts

Posted:
Last Online:  
 

I'm trying to find the method they use where you can mouse over a road segment (or node) and it selects the correct one. 

Does any one know where that method is ? Tried to follow it from Bulldoze but I couldn't see any particular area of the code which showed them looking for segment by mouse point in world. 

Hope some one can point me in the right direction.

Thanks

Share this post


Link to post
Share on other sites
Posted:
Last Online:  
 

What Ronys69 said.

BulldozeTool inherits from DefaultTool. Look at DefaultTool.SimulationStep to see how to use raycasting.

I'm not sure what you want to do. If you want to make your own tool, you can probably just extend DefaultTool and implement Get...IgnoreFlags() and OnToolGUI()

Share this post


Link to post
Share on other sites
  • Original Poster
  • Posted:
    Last Online:  
     
    4 hours ago, boformer said:

    What Ronys69 said.

    BulldozeTool inherits from DefaultTool. Look at DefaultTool.SimulationStep to see how to use raycasting.

    I'm not sure what you want to do. If you want to make your own tool, you can probably just extend DefaultTool and implement Get...IgnoreFlags() and OnToolGUI()


    Well i'm writing my own road mod but needed to know how the mouse selected them. Will take a look at the function, thanks.

    Share this post


    Link to post
    Share on other sites

    Sign In or register to comment...

    To comment in reply, you must be a community member

    Sign In  

    Already have an account? Sign in here.

    Sign In Now

    Create an Account  

    Sign up to join our friendly community. It's easy!  

    Register a New Account


    ×

    Thank You for the Continued Support!

    Simtropolis depends on donations to fund site maintenance costs.
    Without your support, we just would not be in our 24th year online!  You really help make this a great community. *:thumb:

    But we still need your support to stay online. If you're able to, please consider a donation to help us stay up and running. This helps sustain a platform where we can share our community creations for years to come.

    Make a Donation, Get a Gift!

    Expand your city with the best from the Simtropolis Exchange.
    Make a Donation and get one or all three discs today!

    STEX Collections

    By way of a "Thank You" gift, we'd like to send you our STEX Collector's DVD. It's some of the best buildings, lots, maps and mods collected for you over the years. Check out the STEX Collections for more info.

    Each donation helps keep Simtropolis online, open and free!

    Thank you for reading and enjoy the site!

    More About STEX Collections