• entries
    500
  • comments
    1888
  • views
    333247

World Interaction

Sign in to follow this  
EDI

55 views

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  


0 Comments


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