Tuesday, April 2, 2013

Multiple Vehicles, Cameras and FP view

My goal for the day was to prototype having multiple vehicles shown in a 'birdseye' view and be able to select one, control that vehicle from an FP view and then revert back to birdseye view.
This forced me to understand communicating between scripts (objects) and some raycasting for the mouse pointing logic to select an object.

  I did raycasting before in my Three.js prototype to keep the vehicle along the normal to the ground  but in this prototype, however, I just let the physics engine deal with that aspect.  Not sure if the FP view will be one I end up using at all (was thinking an offset third person view would be better) but it might be an option.  2 additional goals for tomorrow - getting the camera to smoothly 'lerp' from birdseye to first person (instead of just snapping) and also allow user to pan/tilt birdseye camera as necessary (including a easy 'direct overhead' mode).
After that, the plan is to change the 'operate' function to be double click and single click will highlight the unit - giving floating health/fuel bar and other stats.

No comments:

Post a Comment