normals?

Blitz3D Forums/Blitz3D Programming/normals?

ryan scott(Posted 2004) [#1]
if this question is too beginner, let me know and i'll move it to beginners...

could someone 'splain me, what exactly is a 'normal'

using pickmode, is there a way to find out if the user clicked near/on a particular vertex of your mesh, so he can drag it to scale it?

are these 2 questions related?

i am building an editing mode into my game where the level designer can add 'trigger points' and various other objects to the terrain, and also click existing objects and resize or move them.


Bot Builder(Posted 2004) [#2]
Do you know what a vector is? Basically, a fancy word for 3 numbers telling you a direction and distance. A normal, however, is a special type of vector - a vector with a length of 1. So it only tells you the direction. I don't see how they're related. As far as your question goes, I remember seeing some code where you can find the 2d bounding box of a 3d object. To tell if the user clicked it you could just see if the cursor is in the bounding box. If you don't want to be able to select through the terrain then set it to be a pick obscurer and then do a entityvisible for the camera and the object.


REDi(Posted 2004) [#3]
A normal basicaly tells a vertex which way its facing so the lighting can be calculated properly, normals are also useful for collision angles.

It's possible to use CameraPick for the sort of thing you want, check the code archives I'm sure you'll find something useful.


big10p(Posted 2004) [#4]
Does this demo help you out any?

http://www.blitzbasic.com/codearcs/codearcs.php?code=1008


sswift(Posted 2004) [#5]
Normals are like invisible lines that point in a certain direction.

If you put a pencil on your desk pointing up, you have a normal pointing away from the plane the desk's surface lies in.

If you put the pencil at the corner of the desk, pointing equally away from all three sides, that is a vertex normal.