NWN like movement

You are an experienced programmer and have a problem with the engine, shaders, or advanced effects? Here you'll get answers.
No questions about C++ programming or topics which are answered in the tutorials!
Post Reply
anarkavre
Posts: 27
Joined: Mon Mar 08, 2004 9:57 pm
Location: PA
Contact:

NWN like movement

Post by anarkavre »

Does anyone know how to do something like when you click at a spot on the map the player goes to that x, y, and z coordinate? Like how Neverwinter Nights does it. Thank you!
"Without curiosity and knowledge, the mind is a vast void. Without the mind, curiosity and knowledge are nonexistent."
l0calh05t
Posts: 68
Joined: Wed Apr 07, 2004 7:08 pm

Post by l0calh05t »

I guess you could do this by creating a triangle selector for your level and then, using getrayfromscreencoordinates, get the appropriate triangle and then just intersect that triangle with the given ray to calculate the desired position. The rest of the work is pathfinding etc.
Raw data for raw nerves

My main PC: Athlon XP 2800+, 512MB RAM, ATI Radeon 9700 Pro 128MB, Win2k SP4
My secondary PC: Pentium III 500 Mhz, 256MB RAM, TNT2 64, Gentoo Linux
Post Reply