Sign in to follow this  
akaitora

Waypoints

Recommended Posts

akaitora    399
Hi guys. I want to write an test application where a spectator camera goes flying through a terrain via way points. I have modeled my sample terrain in Blender and I have also specified way points in blender that have positions and orientations. I wrote a blender exported which exports each way point's position and orientation as well. When I load the way points into my demo, the way point's position and orientation are in model space so I transform them into world space. Finally I iterate through each way point interpolation my camera's position and orientation respectively. Does this sound like a good plan for what I am trying to achieve? Any potential gotchas that you may foresee? Thanks!

Share this post


Link to post
Share on other sites
Buckeye    10747
Certainly sounds like it would work. You're really programming a collision detection routine and you could google for algorithms if you want to enhance the efficiency. E.g., you might want to consider some quick culling methods like a tree for your waypoint information.

A quick look in the tree to determine if there are any waypoints in the "cube" at the camera's position might save time. If there's a waypoint in proximity, then you can do a more detailed collision test.

If your waypoints don't overlap, you might also short-circuit the search if a collision is detected. No sense continuing to look for more collisions if you've already found one.

Share this post


Link to post
Share on other sites

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

Sign in to follow this