Picked Surface / Triangle?

Blitz3D Forums/Blitz3D Programming/Picked Surface / Triangle?

Guy Fawkes(Posted 2014) [#1]
Hi all. I am again working on my normal program instead of a piece OF my program, & would like to know how to modify this code from the code examples (which I modified a little bit), to select a SINGLE surface & turn picked surface red then deselect it by painting it back to its' old color before it was picked (white) if you either click on the mesh surface again, switch between a mesh surface, or click something without an entitypickmode or the distance itself. (In the distance). I would also like to do the same thing for single triangles.

I have managed to get it in SOME aspects to select / deselect.

Picked_Surface_And_Triangle.bb:



Thank You so kindly! =)

~GF


_PJ_(Posted 2014) [#2]
Since linepick type commands only refer to the most recent pick command, you you need to be sure that setting wantpicked depends on the state of the surface not just on/off each time the entity is clicked. The same with oldb - This needs to be updated at some point to change between b and b0 depending on the current state.