🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

World Interaction

posted in A Keyboard and the Truth for project 96 Mill
Published March 13, 2006
Advertisement
So the world interaction system is now 50% done.

With some help from uavfun in #graphicsdev on IRC I was able to get some ray picking working.



A ray is cast from the point on my near-plane in the direction my camera is looking. As the ray travels downward it tests the height-map values for a height collision. When a collision is found the resulting x,z of the colided point is the point on the terrain you clicked.

so with this nice feature I was able to whip up a first pass at user controlled character movement.

While I havent gone into it much, our maps use interconnected nodes that form path networks, when a user clicks somewhere it finds the nearest valid node for the click, and then instructs the currently controlled entity to move there.

The interaction is very smooth so far, no discreet blockyness like MW had, and changing destinations is immediate.

next up is Entity Picking, using a similar method.
Previous Entry You bet I do!
Next Entry progress.
0 likes 0 comments

Comments

Nobody has left a comment. You can be the first!
You must log in to join the conversation.
Don't have a GameDev.net account? Sign up!
Profile
Author
Advertisement
Advertisement