Announcement

Collapse
No announcement yet.

Grid placement of different heights

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Grid placement of different heights

    So far in my game I've been using a landscape for the floor. I want to create a grid I can layover the landscape to use for rts style building placement. I'm having trouble wrapping my head around how I can find out the height at a given point in the landscape. Is this something that is possible and just a function or something I'm over looking.

    I was thinking maybe I'd have to create my landscape as separate meshes inside of maya. I'd like to use landscape if possible but if anyone could point me in the right direction for what I'm trying to do I would greatly appreciate it!

    #3
    Hey thanks for the reply! I have seen that thread, and correct me if I'm wrong but that method assumes the ground is all the same height. I'm trying to do the same thing only account for different heights or z values.


    Edit:
    Well I still haven't figured out how to read from the landscape. But I realized for my idea I don't really need to create a grid. Instead I'm handling object placement by doing a raycast from the mouse cursor to the ground and checking for collision(if the building can be placed). Still needs more work but this seems to be working for me for now. Thanks!
    Last edited by Snackmix; 07-31-2014, 06:00 PM.

    Comment

    Working...
    X