View Single Post
Old 02-09-15, 08:45   #5
Join Date: Dec 2011
Location: Hungary
Posts: 2,750

Adapting the Objects to the Collisions

Apparently it should be better adapting the collisions to the objects but, unortunately the room collisions are very "raw" and for this reason it's not always possible change them to follow the precise shape of the object.

For this reason it's better trying the opposite: modify a bit the shape or position of the items to overlap in better way the possible room collisions we could create.

In above A picture we can see the items in first room of the collision demo, and in B picture the collisions created with collision flipeffects.

Above it's only an exmple, of course, in the project you'll se nothing of alike but only the triggers placed in those sectors.
Anyway, looking above pictures we can understand our problem: while some item have a shape very alike than room collisions (like the sarcophagus), other items (like the statue of the lion or the mummy ) are not so much alike and this situation could create some boring situation in game.

For example if you try to go on the mummy you'll see that, in some position, lara will be hanging in the empty, although only with a little distance.

Differently the sarcophagus is very good, becuase it was exactly 2 sectors for 1 sector, with an height of (exaclty) three clicks.

Instead the lion statue is a bit disaster. When lara jump over him, she will slide down, and this it's ok, but at start of this swimming, her feet will be enter the lion's mane, for almost half leg. This is bad. But the worse is that the lion is too slim respect to sector width and lara will bang versus an invisible wall on lateral sides of the lion.

Tips and tricks to solve some uncompatibilities

When we found some of these problems we could try to fix them in following ways:
  • If you are able to model 3d solit with metaseuoia or 3d max, you can simply restyle the object to get that its main lines were aligned with sector grid and slope types allowed in ngle.
  • You can use triggers to move the item to close it to sector grid. This simple trick allows to gain very much.
  • When the problem is an empty space where there are invisible collision but not the shape of the item, you could add another item in that empty space to justify that transparent collision with this new little item.
  • If the problem is the opposite of previous point, i.e. a side of the object goes off from collision shape, where lara can pass across it, we could use a collision panel (see below in this document) to forbid to lara to reach that crossable zone.
  • With some objects another intelligent solution could be to renounce...
    It's not necessary that lara gets on all items of the level. Some items could have a shape fully uncompatible with room collisions so in this case it will be better to renounce.
The tricks in the Demo Level

The main problem was about the enemy jeep.
That shape seemed good to adapte it to room collision, but when I placed the jeep in the project I discovered this:

The jeep was not correctly aligned with the sector grid.
In these cases it's easy solve the problem: just you apply a trigger to move it in correct position.

; <#> : ANIMATING6 ID:15 in sector (2,4) of Room2
; <&> : Move. Move to east <#>animating for (E)units (one sector = 1024)
; (E) : Units = 632

The enemy jeep is the animating 6, of course.

With this trigger (performed at start of the level) the jeep had the bottom aligned with sector grid, but now there was another problem:

The jeep was not enough big to fit two sectors of width. So I tried to place a collision with a slope in left sector but also in this way the problm is clear: lara remains in air closed to front of the jeep.

To solve this problem I found an item with a shape compatible with the space to fit.

Since that little guard-rail was too little to cover that click of empty I placed two items in same position, and then I used a flieffect to move one of them a bit to east to fit better the empty space.

Now the result is enough good:

Moving items to align them to collision grid

The method of moving items to get the best alignment to collision grid has been used other two times in demo project.
In above picture you can see the room where it has been used many times: to move the bridge and the giant a bit to east, because (look the project in ngle to understand) the bridge was not aligned with sector grid.

Then it has been moved also the little column at right of lara in above picture. You can see in the ngle what was its original (and bad) position.

Simulate rounding collisions

When we use items with rounded shapes and "fill" them with transparent collisions we have many advantages: we can have shapes different by usual box-style and in same time we can walk, climb or monkey these new items, but there is also a disadvantage: the rounding shapes of these items is different than sqaured collisions we applied to them, so in some corners lara could be hanged to invisible walls.

To understand this problem we could give a look to sarcophagus item:

In above picture you can see the green zones where there is a transparent collision.

This is not a big problem, since everytime we create rounded shapes it's normal there will be some of these litte zones with invisible collisions.

Anyway we could try at least to avoid that lara was able to hang on those (missing) corners.

We can realize this target using this special collision trigger:

; <#> : Collision. Set the <&>Side of closed sector as non-hangable from Lara
; <&> : West Side

Playing the demo you can see the result.

Lara will be able to hang on the sarcophagus where the shape is squared with real corners, while she will be not able to hang in the rounded sides of the object.

Remark: differently by other collision triggers, this trigger is a real trigger and it could be exported.

If you look carefully the first room, you see I placed also a condition trigger on sides of sarcophagus to forbid the hanging only in half sector where there is the missing corner, while in other west-side of the sector lara will be able to hang normally on the object.

To round the Sectors

The room collisions don't permit to round the shape of the sectors anyway you can round a bit the square moving up a triangle of that sector to stop lara in that corner.

You can see the example of the hovel in the demo project where the four corners of the hovel are diagonal collisions created moving up the correct triangle of that sector.

Another way is to use the set of collision panels you find in collis.wad file. See below.
AkyV is offline