• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

Advanced Camera AOA or similiar solution+PanCameraWithZ

Status
Not open for further replies.
Level 17
Joined
Nov 13, 2006
Messages
1,814
problem is every camera system work well till dont have a cliff or something ahead or behind of unit what block the camera (example behind the unit have a cliff then camera will be inside the cliff) or when u go up to mountain then u dont see too much, same if u go down

another problem
call PanCameraToTimedWithZ (GetLocationX(loc),GetLocationY(loc),150+GetUnitFlyHeight(u)+GetLocationZ(loc),0.15)

if i use this then everything ok in most of case but sometimes if unit dont move anymore then camera drop down to group instead stay at 150 height

i posted the screen

first i thought i make every time a unit and remove it for getting the terrain height (Z) and put camera to that heigh but problem that dont work when toward the unit have a mountain, if i create unit toward to unit then stil have problem coz camera could be in wrong place behind.
 

Attachments

  • 1.jpg
    1.jpg
    21.1 KB · Views: 89
Last edited:
Level 17
Joined
Nov 13, 2006
Messages
1,814
y just it vjass, i tryed make in jass if possible :)


it was made with item creating for check the z?
create item each short time/save harshtable etc not slowdown a bit? or only i felt in village a bit laggy movement?
JASS:
    private function IsCoordPathable takes real x, real y returns boolean
        call SetItemVisible(ite,true)
        call SetItemPosition(ite,x,y)
        set x = GetItemX( ite) - x
        set y = GetItemY( ite) - y
        call SetItemVisible(ite,false)
        if x < 1 and x > -1 and  y < 1 and y > -1 then
            return true
        endif
        return false
    endfunction    

    private function HideAllItems takes nothing returns nothing
        if IsItemVisible(GetEnumItem()) then
            call SaveInteger(h,GetHandleId(GetEnumItem()),0,1)
        endif
        call SetItemVisible(GetEnumItem(),false)
    endfunction

    private function ShowAllItems takes nothing returns nothing
        if LoadInteger(h,GetHandleId(GetEnumItem()),0) == 1 then
            call SetItemVisible(GetEnumItem(),true)
            call FlushChildHashtable(h,GetHandleId(GetEnumItem()))      
        endif
    endfunction
 
Status
Not open for further replies.
Top