IsPointInMap - Void Testing Solution

Post a reply

Smilies
:D :) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :wink: :geek: :ugeek: :!: :?: :idea: :arrow: :| :mrgreen: :3: :wub: >:( :blergh:
View more smilies

BBCode is OFF
Smilies are ON

Topic review
   

Expand view Topic review: IsPointInMap - Void Testing Solution

Re: IsPointInMap - Void Testing Solution

by Graf Zahl » Wed Nov 07, 2018 3:26 pm

The main issue here is that the semantics of this function are not the same as of P_PointOnSide or P_PointOnDivLineside because it has to consider the special needs of the node builder. Please rewrite this to use P_PointOnDivLineSide. It may need a bit more setup but is the better choice here.

Re: IsPointInMap - Void Testing Solution

by Major Cooke » Wed Nov 07, 2018 3:14 pm

I didn't know how to use the other versions of the function properly since they involved nodes.

Re: IsPointInMap - Void Testing Solution

by Graf Zahl » Wed Nov 07, 2018 2:50 pm

Why is this using an internal function of the node builder?

Re: IsPointInMap - Void Testing Solution

by Rachael » Wed Nov 07, 2018 2:18 pm

Saved me the trouble of (eventually) getting around to it.

IsPointInMap - Void Testing Solution

by Major Cooke » Wed Nov 07, 2018 2:09 pm

Pull Request

Big thanks to dpJudas and Gutawer for helping me with this.

Finally, now you can test and see if a vector is inside the map or in the void. See the example below.
Attachments
test.pk3
Prints a message every second: "in map" or "in void" based on if inside level geometry. Noclip outside the map to test.
(470 Bytes) Downloaded 61 times

Top