View unanswered posts | View active topics It is currently Thu Mar 21, 2019 9:21 am

 Page 1 of 1 [ 3 posts ]
 Print view Previous topic | Next topic
Best way to avoid terrainrape
Author Message

Joined: Mon Dec 21, 2015 9:30 am
Posts: 82
Best way to avoid terrainrape
What's the best way to avoid strong bullets digging too far into concrete and dirt? I was thinking of raycasting to detect terrain and lower sharpness but while there seem to be both MO rays and obstacle rays there doesn't seem to be a dedicated terrain ray.

Apparently CastStrengthRay deals in terrain but the documentation on that is basically none. Can someone explain how I'd detect only terrain in front of a thing in lua?

Tue Jan 23, 2018 1:12 am

Joined: Tue Jun 12, 2007 11:52 pm
Posts: 10844
Location: Here
Re: Best way to avoid terrainrape
Documentation

has an example

The fourth argument (described as "A reference to the vector screen will be filled out with the absolute location of the found terrain pixel of less than or equal to above strength") is a pointer to a vector that will be set as the location of the first found terrain pixel. You can just throw Vector(0,0) in there if you don't need that for anything.

Everything else should be fairly straight forward. Feel free to ask if you have a specific question.

Tue Jan 23, 2018 1:29 am

Joined: Mon Dec 21, 2015 9:30 am
Posts: 82
Re: Best way to avoid terrainrape
CaveCricket48 wrote:
Documentation

has an example

The fourth argument (described as "A reference to the vector screen will be filled out with the absolute location of the found terrain pixel of less than or equal to above strength") is a pointer to a vector that will be set as the location of the first found terrain pixel. You can just throw Vector(0,0) in there if you don't need that for anything.

Everything else should be fairly straight forward. Feel free to ask if you have a specific question.

Thanks dude! Went to the functions page and saw it had no info written down so I thought wiki didn't have anything. Guess I now know where to look.

Tue Jan 23, 2018 1:53 am
Display posts from previous:  Sort by
 Page 1 of 1 [ 3 posts ]

#### Who is online

Users browsing this forum: No registered users

 You cannot post new topics in this forumYou cannot reply to topics in this forumYou cannot edit your posts in this forumYou cannot delete your posts in this forumYou cannot post attachments in this forum

Search for:
 Jump to:  Select a forum ------------------ Cortex Command    Dev Log    Wiki    Game Discussion    Game and Licensing Support    Mod Making       Lua Scripting       Requests    Mod Releases       Older Mods    Scene Releases       Scene Making Planetoid Pioneers    Game Discussion    Pioneer Program Lounge Data Realms Off-Topic    Off Topic Chat       Gaming       Forum Games    Site Support & Feedback