Jump to content
  • Advertisement
  • entries
  • comments
  • views

World Interaction

Sign in to follow this  


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.
Sign in to follow this  


Recommended Comments

There are no comments to display.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!