Like "torchlight" or "diablo Ⅲ" this camera follow the protagonist, the mouse wheel to zoom, this how? There is a detail, when the lens tall buildings, building people blocked, how? Figure highlights, transparent or building?
CodePudding user response:
Method 1: put the main camera in the leading role of the following, as a child object, adjust the camera Angle of view, will be followed at this time. Method 2: let the camera position or rotation associated with code distance attribute and the leading role and the corresponding adjustment, etc.
The mouse wheel scale effects, detect whether there is a pulley sliding, if it is to let the camera and the leading role of distance with smooth rotation to produce change.