NikMik Posted August 7, 2015 Share Posted August 7, 2015 (edited) SOLVED. Leaving this up, and you can look in the comments to see the resolution. Welp. I said I wasn't going to give away the details of the new Warfarin update, but I need help with one single problem... The update is introducing the ability to climb, jump, vault, all that good stuff. The ability to leap over small gaps in terrain is where my problem lies: To prevent Warfarin being able to walk on the water, I've made it so when landing in water the screen will go black, and then War will be teleported to a random spot around the shore. However, the edge of the ground (where the texture overhangs) is still considered as impassible terrain. local pt = Vector3(inst.Transform:GetWorldPosition())local tiletype = GetGroundTypeAtPosition(pt)local groundless = tiletype == GROUND.IMPASSABLEif groundless then ^^ Is the code I've used to track what Warfarin lands on. I will admit I'm inexperience with terrain or where to search around for it. So, anyone who can help? Or do I have to find another way around this? Edited August 7, 2015 by Mr. Tiddles Link to comment https://forums.kleientertainment.com/forums/topic/56870-checking-terrain-edge-of-ground-still-considered-water/ Share on other sites More sharing options...
Kzisor Posted August 7, 2015 Share Posted August 7, 2015 I would mention you, but stupid periods. Instead of the code you're using use the following to find a proper walkable offset.FindWalkableOffset(position, start_angle, radius, attempts, check_los, ignore_walls) Link to comment https://forums.kleientertainment.com/forums/topic/56870-checking-terrain-edge-of-ground-still-considered-water/#findComment-660890 Share on other sites More sharing options...
NikMik Posted August 7, 2015 Author Share Posted August 7, 2015 I would mention you, but stupid periods. Instead of the code you're using use the following to find a proper walkable offset.FindWalkableOffset(position, start_angle, radius, attempts, check_los, ignore_walls)A mention isn't needed, I already followed the topic. No problem.And anywhere I could find that code in use? So I can look into it further. Link to comment https://forums.kleientertainment.com/forums/topic/56870-checking-terrain-edge-of-ground-still-considered-water/#findComment-660893 Share on other sites More sharing options...
Kzisor Posted August 7, 2015 Share Posted August 7, 2015 scripts/simutil.lua Link to comment https://forums.kleientertainment.com/forums/topic/56870-checking-terrain-edge-of-ground-still-considered-water/#findComment-660900 Share on other sites More sharing options...
NikMik Posted August 7, 2015 Author Share Posted August 7, 2015 (edited) scripts/simutil.luaOh. Of course. Literally the only .lua in the scripts directory my brain told me to disregard for some reason while looking for answers. I feel like a right bell end. Edited August 7, 2015 by Mr. Tiddles Link to comment https://forums.kleientertainment.com/forums/topic/56870-checking-terrain-edge-of-ground-still-considered-water/#findComment-660902 Share on other sites More sharing options...
NikMik Posted August 7, 2015 Author Share Posted August 7, 2015 scripts/simutil.luaAha! Works perfectly. Thank you very much for the help! Link to comment https://forums.kleientertainment.com/forums/topic/56870-checking-terrain-edge-of-ground-still-considered-water/#findComment-660909 Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now