• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[JASS] CBS Easy camera help

Status
Not open for further replies.
Hi guys I am trying to set up the camera bounds for my inventory system, however I can't find the right values for the camera bounds. I already wasted hours trying to find them, but I feel frustrated ...
Can some one help me ?
Btw, minX and minY are both equal to "zero" ... and still I didn't find the answer !! ARghh !

JASS:
function setCamera takes nothing returns nothing
    local real minX = bootomLeftX()
    local real maxX = minX 
    local real minY = bootomLeftY()
    local real maxY = minY 
    local real centerX = (minX + maxX) / 2
    local real centerY = (minY + maxY) / 2
    local real duration=0.00
    local camerasetup windowLoc = CreateCameraSetup()
 
    call CameraSetupSetField(windowLoc, CAMERA_FIELD_TARGET_DISTANCE, 600.00, duration)
    call CameraSetupSetField(windowLoc, CAMERA_FIELD_FARZ, 1000.00, duration)
    call CameraSetupSetField(windowLoc, CAMERA_FIELD_ZOFFSET, 0.00, duration)
    call CameraSetupSetField(windowLoc, CAMERA_FIELD_ANGLE_OF_ATTACK, 270.00, duration)
    call CameraSetupSetField(windowLoc, CAMERA_FIELD_FIELD_OF_VIEW, 70.00, duration)
    call CameraSetupSetField(windowLoc, CAMERA_FIELD_ROLL, 0.00, duration)
    call CameraSetupSetField(windowLoc, CAMERA_FIELD_ROTATION, 90.00, duration)
    call CameraSetupSetDestPosition(windowLoc, centerX + 300, centerY + 125, duration)
    
    //I can't find the right value for the camera bounds, can some one help me ?
    call SetCameraBounds(minX, minY, minX, maxY+75, maxX+275, maxY+75, maxX+275, minY)
    call CameraSetupApplyForceDuration(windowLoc, true, 0.)

You guys know the drill, +rep to all those who help me =S
 

Attachments

  • CBS.w3x
    39.1 KB · Views: 43
Level 4
Joined
Jul 24, 2008
Messages
108
I am not that great at JASS any everything but what i did notice is that if minX and minY are 0, that means that maxX and maxY are also zero and that the centerX and centerY are also 0. So all your values are set to zero. As I said, i don't know much about jass, im just pointing out what i see and it may or may not be helpful
 
Status
Not open for further replies.
Top