HeroEngine Forums
Welcome, Guest. Please login or Register for HeroCloud Account.

Author Topic: [Resolved] New Room Bounding Box not working  (Read 1257 times)

FI-ScottZ

  • General Accounts
  • *
  • Posts: 1407
    • View Profile
    • Forever Interactive, Inc.
[Resolved] New Room Bounding Box not working
« on: Dec 18, 10, 07:44:41 PM »

We have a number of assets in a particular room.  The Room Visibility Mode shows the bounding box around them correctly, and with "Auto" on for the Room Panel they correctly appear/disappear when the camera moves in or out of the box.

When we add a new model to the room or move an existing one, the Visibility Mode shows the new bounding box looking correct, but the Auto show/hide still happens based on the old box.

I even tried the Update BB button of the Area panel, which the wiki says is no longer used, but to no avail.  Is there something in particular to do to get the room show/hide to use the new box?
« Last Edit: Oct 31, 12, 03:45:17 PM by HE-Cooper »
Logged
Scott Zarnke
Lead Programmer, Visions of Zosimos
CTO, Forever Interactive, Inc.

FI-ScottZ

  • General Accounts
  • *
  • Posts: 1407
    • View Profile
    • Forever Interactive, Inc.
Re: New Room Bounding Box not working
« Reply #1 on: Dec 18, 10, 08:15:15 PM »

Our room currently only contains Granny static models.  When I added the heightmap they are sitting on, the box changed to be the size of the heightmap and the show/hide worked right away for that.  But we still can't get the show/hide to work if the box is resized based on Granny models.
Logged
Scott Zarnke
Lead Programmer, Visions of Zosimos
CTO, Forever Interactive, Inc.

HE-JAY

  • HeroEngine
  • *****
  • Posts: 122
    • View Profile
Re: New Room Bounding Box not working
« Reply #2 on: Dec 20, 10, 05:25:54 PM »

The decision about which room to assign the camera to (for the purpose of room transitions) is based upon two things:
  • The current position of the camera.
  • The room membership of the object directly beneath the camera.

If the camera is currently hovering over an object in Room A, then moves such that an object in Room B is positioned directly beneath it, a room transition will occur to room B.  What this means in the case where you have multiple overlapping rooms (as I suspect is the case with you) is that a transition is not necessarily triggered based upon crossing room boundaries, rather it is triggered based upon the relative position of objects in the room and the camera (namely, objects being beneath the camera).  As such, the visual representation of rooms in the 'visualize room boundaries' tool will not correspond to the boundaries for transitions.  While this may be somewhat counterintuitive, understanding what triggers a room transition can help ensure your rooms and their assets have the correct visibility settings to prevent 'disappearing objects' or other artifacts caused by unexpected transitions.

Implications of this behavior:
  • Adding an asset instance onto some area geometry in a room and then moving that instance to another room will trigger a room transition whenever the camera happens to cross over the instance. This is usually not an issue if you're smart about setting visibility for rooms that happen to intersect in this way, but it could cause strange artifacts when the camera is passed over these objects if you're not expecting this behavior.
  • Having several rooms whose bounding boxes overlap introduces a need to manually manage visible rooms much more carefully.

Hopefully this will help you isolate the cause of the problem.  If not - and you really think there's an issue with the way rooms are working (or if you'd like a more thorough explanation of how this works) - feel free to provide a more detailed description of your particular case to help me reproduce the behavior!
Logged

FI-ScottZ

  • General Accounts
  • *
  • Posts: 1407
    • View Profile
    • Forever Interactive, Inc.
Re: New Room Bounding Box not working
« Reply #3 on: Dec 20, 10, 05:49:24 PM »

OK, Jay, that makes sense.  I assumed it was based on the bounding box, but I see now that it needs to be directly over an item in a room for that room to be active.  That clears it up.  Thanks.
Logged
Scott Zarnke
Lead Programmer, Visions of Zosimos
CTO, Forever Interactive, Inc.