Jump to content

How to find the Ground


PJMail

Recommended Posts

Anyone figured out a way to find out - even roughly - how far above the ground/buildings/whatever you are? In a Script.

All the "findnearest..." functions are useless as most ground objects can't be found this way (probably buried in precombines).

Thought of dropping an invisible object but sounds very slow and messy.

This is for my Vertibird Mod, as otherwise I can easily fly under the ground if I am not careful.

 

Thanks

Link to comment
Share on other sites

I like that - a rat. My concern is the time it takes to fall, it bouncing off/sliding away when it does hit the ground, and whether it will damage something/be considered an attack if it hits an NPC. How did you solve all those issues? Getting it's Z pos then deleting it is the easy bit.

Link to comment
Share on other sites

I didn't create a new one each time. I had an empty cell with a selection of marker rats in it. :) Then I would just put one at some z position, and I think there was an OBSE function to instantly make it hit the ground. (at which point, I could get the position.) In oblivion, whacking someone with a rat wasn't considered 'an attack', and if you did hit someone, they didn't take any damage...... In fallout 4, however..... and papyrus....... I don't know if either of those will be the case. You can't remove collision from the marker rat, as it would just pass right thru the ground........

Link to comment
Share on other sites

Yeah - all different in FO4. Easy to create an instance of an object at a point, make it transparent, enable physics on it, and then what happens 'happens'...... Eventually....

No 'instant to ground', and totally out of your control.

Good for real world modelling, but tough otherwise.

Link to comment
Share on other sites

Is this something you want to do continuously? Or just when hovering, and preparing to land? I can't seem to find any way to judge distance above objects on the fly...... I think the game has issues with it as well, as I see vertibirds do some odd stuff....... Probably need the FOSE folks to see if they can expose that information.....

Link to comment
Share on other sites

Just when hovering, so testing 'movetonearestnavmesh' call. Access to terrain data would be useful to other mods though, but I would be surprized if the F4SE people could get that data.

The Max Height data though - that should be accessible somehow. Not that it is very good - as you noticed with Vertibirds that use it...

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...