Skip to main content
GameDev.net gamedev.net
🔒 Locked 🎮 Unity

Waypoints

Started by akaitora Feb 9, 2010 at 8:16 AM 0 replies 600+ views
Original Post
akaitora
akaitora
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!
xdpixel.com - Practical Computer Graphics
Buckeye
Buckeye
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.
Please don't PM me with questions. Post them in the forums for everyone's benefit, and I can embarrass myself publicly. You don't forget how to play when you grow old; you grow old when you forget how to play.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.