Greslin Posted February 29, 2012 Share Posted February 29, 2012 (edited) Is there any quick, clean way of determining whether a given X/Y/Z position within the current cell/worldspace happens to be currently unoccupied by a physical (i.e., collision causing) object? I've gone through the GECK and ES wikis, and even through the NVSE source code headers, but can't seem to find any functions anywhere that even accept coordinate values as calling parameters. What I'm looking for basically is something that can be used for collision detection on the fly, sort of a function along the lines of: (bool:int) IsCellCoordEmpty varX varY varZ where, given an set of adjusted GetPos values, I can determine whether those coordinates represent an unoccupied space in the current cell/worldspace. Am I missing something obvious, or is this just not available? Edited February 29, 2012 by Greslin Link to comment Share on other sites More sharing options...
rickerhk Posted February 29, 2012 Share Posted February 29, 2012 There's nothing like that available in vanilla or NVSE. If you have the GetPos values, like from a ref walk, you need to know where the getpos coordinates actually are for the object - Like for the player, Getpos returns values at the feet. It varies by the type of object too. Then you need to know the dimensions of the object and then all the math. I don't even know if refwalks can return walls - or even if it would be useful, since many statics for buildings are a section of ceiling, floor, and wall. Link to comment Share on other sites More sharing options...
Jeoshua Posted February 29, 2012 Share Posted February 29, 2012 A Refwalk would take far too long for what I assume Greslin is trying to do. It is possible to have a collision mesh that is invisible and yet is moved dynamically to stay in front of the player, or wherever you need it to go. Such things are used for quest triggers and the like. Trouble is, I believe that only NPCs and Creatures will flip it's bits. Statics and Movable Statics do not, as can be evidenced by throwing a crate at a trap and it not going off. Link to comment Share on other sites More sharing options...
Recommended Posts