# Camera On a Line

This topic is 4938 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

There is a tech show at my school next week, and I would like to put my terrain engine in there as a WIP...but I dont want the user to have control. I would like my camera to "fly" around randomly... Does anyone have any articles or any thoughts on how this can be achieved? It would start at 0,0, and it wouldn't be able to past a certain point (because of the sky dome radius), and would have to stay above the terrain in height... Any ideas on how to get it to move around smoothly and give a good flying feeling? It has to be able to be implemented fairly easily and quickly. Thanks.

##### Share on other sites
I think the easiest and quickest way would be to do a simple waypoint system. But make the waypoints randomly generated within the bounds on the world. Then just give the camera some basic movement stats (acceleration, max speed, max turning speed, etc), and let it do its thing.

Matt Hughson

##### Share on other sites
I would also factor in the actual height of the terrain - if you need to be in height 10, for example, do it 10+current terrain height, so you won't get into trouble. Also, I would have the camera either look to the center point in the terrain, or as an angle in the different axis from its current position, so you'd have effects like staring ahead, or to the sides, or down, etc.

##### Share on other sites
Quote:
 Original post by DadleFishI would also factor in the actual height of the terrain - if you need to be in height 10, for example, do it 10+current terrain height, so you won't get into trouble. Also, I would have the camera either look to the center point in the terrain, or as an angle in the different axis from its current position, so you'd have effects like staring ahead, or to the sides, or down, etc.

Maybe calculate 2 points eveytime you reach a target waypoint; the next waypoint, and a new random 'look point'.

Matt Hughson

##### Share on other sites
Sounds beautiful to me! Thanks guys!

##### Share on other sites
I think it would look "smarter" if you manually defined position/look-at points and simply put them in an array. You would of course interpolate between the points for a smooth ride. You could give a virtual tour of the terrain without it looking like it was filmed by a half-minded bumblebee with a camera strapped to his back.

1. 1
Rutin
67
2. 2
3. 3
4. 4
5. 5

• 21
• 10
• 33
• 20
• 9
• ### Forum Statistics

• Total Topics
633416
• Total Posts
3011780
• ### Who's Online (See full list)

There are no registered users currently online

×