Jump to content
The Dark Mod Forums

Doors on a diagonal: wont open correctly


Bikerdude

Recommended Posts

I don't think it's possible, at least I never found a way to do it. The solution I ended up using was just to have a single door at that angle and make it swing upwards.

But you should walk having internal dignity. Be a wonderful person who can dance pleasantly to the rhythm of the universe.

-Sun Myung Moon

 

My work blog: gfleisher.blogspot.com

Link to comment
Share on other sites

Doors only rotate about the x or y or z axes.

 

To get a door to rotate around anything else would require scripting. The script would need to recalculate the door position and angle every frame.

 

I don't recall anyone having written such a script. (Even if I did it, I don't remember doing it. Old age sucks.)

 

Equations exist for rotating around a given 3d axis; the scripter would search for and start with that.

Link to comment
Share on other sites

That having been said, I remember that the doors of footlockers will open around a random vector in the xy plane. Most of us orient footlockers along the x or y planes, but there was one in Outpost that was not set up that way, and it works fine. I think the math uses the local axes orientation of the door rather than the world axes when opening.

 

Maybe there's hope in grabbing a footlocker prefab, rotating it so the door angle matches the cellar door angle, and see what happens when you open it. If that works, perhaps the attributes of the footlocker door can be transferred to the cellar door. Dunno, but it's worth a try before hiring a scripter.

Link to comment
Share on other sites

Hey, I asked this question a while back and Sotha is the one who gave me a good solution. Let me see if I can't find that thread

  • Like 1
Link to comment
Share on other sites

https://drive.google.com/file/d/1op_tFCldbh8TF8ihI6vbm4HVWeJI6qwk/view?usp=sharing

 

Here is a download link to a test map that Sotha made for the door. (let me know if this doesn't work or if you can't download it)

 

The idea is that you make a func_static of like a cup or a plate or something small, then angle it to the angle you have your doors at, then bind the doors to the func_static, and it should work like a dream. Its a workaround, sure, but players shouldn't know the difference. You can just hide the cup anywhere in the map and you should be good to go

  • Like 1
Link to comment
Share on other sites

The rotation is specified by the rotate spawnarg, which is a vector, not a scalar. Passing the correct vector should allow such rotations without the need of the above mentioned workaround. idTech 4 uses Euler angles if I am not mistaken.

FM's: Builder Roads, Old Habits, Old Habits Rebuild

Mapping and Scripting: Apples and Peaches

Sculptris Models and Tutorials: Obsttortes Models

My wiki articles: Obstipedia

Texture Blending in DR: DR ASE Blend Exporter

Link to comment
Share on other sites

Addentum: The rotation is actually yzx, so not really Euler. Calculating the correct vector is a bit annoying, though. However, it is not necessary to create an extra entity to bind your door to. The doorframe containing the door will suffice.

 

I guess the most straight-forward approach (at least from my point of view ;) ) would be to use doorframes that have the doors def-attached.

FM's: Builder Roads, Old Habits, Old Habits Rebuild

Mapping and Scripting: Apples and Peaches

Sculptris Models and Tutorials: Obsttortes Models

My wiki articles: Obstipedia

Texture Blending in DR: DR ASE Blend Exporter

Link to comment
Share on other sites

That's a good idea. Also, you wouldn't be able to put a visportal on a slanted door right? Don't they have to be upright or flat?

Link to comment
Share on other sites

I've made door like this based on func_rotating but the problem is with button attached to the door: if player stands in it's way, the door model will stop and func_rotating will make next reversed move from that point, breaking default start-stop position. I've tried "not pushable" and "push player" with no success. You can avoid this if button will not we bound to the door, some sort of a lever or a chain aside of the door (maybe if it will be lever, not button - it will benefit from "not pushable" and "push player", I didn't checked. And no solid makes button not frobable).

 

https://1drv.ms/u/s!AoIlw2GQnPGZcqnZ6yHFEg1dVN0

Edited by ERH+

S2wtMNl.gif

Link to comment
Share on other sites

That's a good idea. Also, you wouldn't be able to put a visportal on a slanted door right? Don't they have to be upright or flat?

Visportals are flat, but they don't have to stand upright. Their orientation doesn't matter. It is a good idea to avoid them to have more then 4 edges (and keep them rectangular probably), though, as otherwise they will (or were, maybe this has been changed in the code) cause issues with sound propagation due to some optimization in the code.

  • Like 1

FM's: Builder Roads, Old Habits, Old Habits Rebuild

Mapping and Scripting: Apples and Peaches

Sculptris Models and Tutorials: Obsttortes Models

My wiki articles: Obstipedia

Texture Blending in DR: DR ASE Blend Exporter

Link to comment
Share on other sites

The sound propagation code doesn't care how many sides a visportal has.

 

IIRC, think of the actual N-sided portal fitting inside a virtual 4-sided portal. The sides of the virtual portal are used for propagation, which is good enough for sound purposes.

Link to comment
Share on other sites

If there is a way to make an angled door like this, I recommend a version it be made into a prefab and packaged with the mod, because it's a problem a lot of mapper have run into over the years.

What do you see when you turn out the light? I can't tell you but I know that it's mine.

Link to comment
Share on other sites

If there is a way to make an angled door like this, I recommend a version it be made into a prefab and packaged with the mod, because it's a problem a lot of mapper have run into over the years.

On it.

 

I will make a set of coal/basement doors like I was trying to as this I think will be what mappers will be wanting to use.

  • Like 3
Link to comment
Share on other sites

The sound propagation code doesn't care how many sides a visportal has.

 

IIRC, think of the actual N-sided portal fitting inside a virtual 4-sided portal. The sides of the virtual portal are used for propagation, which is good enough for sound purposes.

Than this must have been changed. The last time I looked at the specific peace of code the center of the visportal plane was used if the amount of sides exceeded four. Been a while, though.

 

EDIT: I've just taken a look and you are right. The amount of portal sides does not matter. My mistake.

FM's: Builder Roads, Old Habits, Old Habits Rebuild

Mapping and Scripting: Apples and Peaches

Sculptris Models and Tutorials: Obsttortes Models

My wiki articles: Obstipedia

Texture Blending in DR: DR ASE Blend Exporter

Link to comment
Share on other sites

Think of sound propagation as a loose string that runs through all the portals between points A and B (A = producer, B = listener).

 

Now pull the string taught.

 

It slides into place at the appropriate points in each portal, providing the shortest distance from A to B.

 

Ever since I made that change, we haven't had any complaints about sound not behaving correctly. If the mapper does a good job with his portals, sound delivery should be as realistic as we can make it.

  • Like 2
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recent Status Updates

    • OrbWeaver

      Does anyone actually use the Normalise button in the Surface inspector? Even after looking at the code I'm not quite sure what it's for.
      · 5 replies
    • Ansome

      Turns out my 15th anniversary mission idea has already been done once or twice before! I've been beaten to the punch once again, but I suppose that's to be expected when there's over 170 FMs out there, eh? I'm not complaining though, I love learning new tricks and taking inspiration from past FMs. Best of luck on your own fan missions!
      · 4 replies
    • The Black Arrow

      I wanna play Doom 3, but fhDoom has much better features than dhewm3, yet fhDoom is old, outdated and probably not supported. Damn!
      Makes me think that TDM engine for Doom 3 itself would actually be perfect.
      · 6 replies
    • Petike the Taffer

      Maybe a bit of advice ? In the FM series I'm preparing, the two main characters have the given names Toby and Agnes (it's the protagonist and deuteragonist, respectively), I've been toying with the idea of giving them family names as well, since many of the FM series have named protagonists who have surnames. Toby's from a family who were usually farriers, though he eventually wound up working as a cobbler (this serves as a daylight "front" for his night time thieving). Would it make sense if the man's popularly accepted family name was Farrier ? It's an existing, though less common English surname, and it directly refers to the profession practiced by his relatives. Your suggestions ?
      · 9 replies
    • nbohr1more

      Looks like the "Reverse April Fools" releases were too well hidden. Darkfate still hasn't acknowledge all the new releases. Did you play any of the new April Fools missions?
      · 5 replies
×
×
  • Create New...