View unanswered posts | View active topics It is currently Tue Dec 03, 2024 9:19 pm



Reply to topic  [ 3 posts ] 
 Best way to avoid terrainrape 
Author Message

Joined: Mon Dec 21, 2015 9:30 am
Posts: 89
Reply with quote
Post 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
Profile
User avatar

Joined: Tue Jun 12, 2007 11:52 pm
Posts: 13144
Location: Here
Reply with quote
Post Re: Best way to avoid terrainrape
Documentation

Coalition.rte/Devices/Weapons/GrenadeStick.lua
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
Profile

Joined: Mon Dec 21, 2015 9:30 am
Posts: 89
Reply with quote
Post Re: Best way to avoid terrainrape
CaveCricket48 wrote:
Documentation

Coalition.rte/Devices/Weapons/GrenadeStick.lua
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
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 3 posts ] 

Who is online

Users browsing this forum: No registered users


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

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by STSoftware for PTF.
[ Time : 0.025s | 14 Queries | GZIP : Off ]