Jump to content
The Dark Mod Forums

2015 Halloween contest


Melan

  

17 members have voted

  1. 1. Do you want to participate in the Halloween contest?

    • I am in!
      10
    • I can't / don't want to participate
      7


Recommended Posts

Two quick technical questions:

 

  • How do I rotate a door about an arbitrary axis (or one in its local coordinate system)? I have a slanted cellar access door but it doesn't rotate about its local axes but rather a global axis. Not what I expecteded or need.
  • How can I spawn an entity via script or otherwise? I want to block a path at a certain point in the mission.
Link to comment
Share on other sites

  • How do I rotate a door about an arbitrary axis (or one in its local coordinate system)? I have a slanted cellar access door but it doesn't rotate about its local axes but rather a global axis. Not what I expecteded or need.

 

 

Start with a normal door entity. Use a door entity with a model, not a world brush that's been converted to a mover_door.

 

Set the opening rotation about the long axis. [y z x]

 

Rotate the door in DR to the angled position you want it in.

 

The local axes will rotate with the door.

 

Open the door and it should open along the (now) angled axis.

 

If you have to have a custom door and not one of the ones provided by TDM, you could create your custom door as a func_static, export it as a model, and import the model and follow the above steps. I haven't tried this; I assume the local axes will rotate with the custom model the same as a TDM-supplied model.

Link to comment
Share on other sites

  • How can I spawn an entity via script or otherwise? I want to block a path at a certain point in the mission.

 

 

The easiest method is to premake the entity and teleport it in when you need it.

 

If that's not sufficient, come back for a scripted solution.

Link to comment
Share on other sites

Remind me how to make a self-made moveable, like a frobable plank you can remove from a wall. If I just change the func_stat class to moveable it turns into a black box.

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

Remind me how to make a self-made moveable, like a frobable plank you can remove from a wall. If I just change the func_stat class to moveable it turns into a black box.

 

Have you made a collision model for it yet?

Link to comment
Share on other sites

 

Start with a normal door entity. Use a door entity with a model, not a world brush that's been converted to a mover_door.

 

Set the opening rotation about the long axis. [y z x]

 

Rotate the door in DR to the angled position you want it in.

 

The local axes will rotate with the door.

 

Open the door and it should open along the (now) angled axis.

Thanks, but that didn't work. I think I did it exactly this way.

 

The door does not rotate about the local axis. I set "rotate" to "0 -100 0" so it moves like you would expect in the default position. When I then rotate the door (around the x axis) it still rotates around the z world axis when opened.

Link to comment
Share on other sites

Thanks, but that didn't work. I think I did it exactly this way.

 

The door does not rotate about the local axis. I set "rotate" to "0 -100 0" so it moves like you would expect in the default position. When I then rotate the door (around the x axis) it still rotates around the z world axis when opened.

 

What door entity are you using?

Link to comment
Share on other sites

atdm:door_96x48_2hinge

 

I just tried it and it seems (to my surprise) that yes doors rotate using the global axes not local ones. It's defined by the "rotate" spawnarg which defaults to "0 90 0", meaning +90 degrees round the global y axis. If your door's axis is horizontal but still aligned along either the x or z axes in DR, you can probably get the right result by using the x or z axes: 90 0 0 or -90 0 0 or 0 0 90 etc

 

If it's at bizarre angle, then post its "rotation" spawnarg and we can try to work out the right values for the "rotate" spawnarg.

Link to comment
Share on other sites

I haven't been able to get it to work. There must be something special about rotating about the Z axis that the code won't rotate locally.

 

I based my suggestion on the footlocker lid, which lies flat and rotates about the local x axis. You can rotate that door any which way and it always rotates around the local x axis. I was unable to achieve this same behavior for a local Z axis.

 

I have no other suggestions. Hopefully someone else can think of something.

Link to comment
Share on other sites

I'm done for the day. Total time spent so far: 4h.

 

Basic geometry is done, no rooms will be added anymore. Visportals and doors were added. Added player start and dmapped for the first time. Fixed few leaks. Hunted some sounds from freesound.org, wrote a few lines for player character comments.

 

Next 2h packet will probably be: lighting, furniture, decoration.

  • Like 2

Clipper

-The mapper's best friend.

Link to comment
Share on other sites

The door is rotated around x (red) axis. This is the matrix stored in "rotation":

1 0 0 0 0.265889 -0.964004 0 0.964004 0.265889

Edit: If someone can compute the resulting angles (Euler angles?) that would be great. If not, I just lay the door flat.

Edited by Baal
Link to comment
Share on other sites

I started tonight, and logged about 2 hours, spending that time building some building facades and a fancy city wall with a tower. More tomorrow.

Come the time of peril, did the ground gape, and did the dead rest unquiet 'gainst us. Our bands of iron and hammers of stone prevailed not, and some did doubt the Builder's plan. But the seals held strong, and the few did triumph, and the doubters were lain into the foundations of the new sanctum. -- Collected letters of the Smith-in-Exile, Civitas Approved

Link to comment
Share on other sites

The door is rotated around x (red) axis. This is the matrix stored in "rotation":

1 0 0 0 0.265889 -0.964004 0 0.964004 0.265889

Edit: If someone can compute the resulting angles (Euler angles?) that would be great. If not, I just lay the door flat.

 

I don't think there's enough information here to provide a correct answer.

 

The code will only rotate doors around the x or y or z global axes, OR the x or y or z local axes. It can't rotate a door around a general vector.

 

I think the footlocker lid works at all angles because its hinge side is along the x axis. All our big door models have the hinge axis along the z axis, and there's no way I know of to fool the code into thinking it should rotate the big doors around anything but the global Z axis.

 

I don't even think you can create a model from a func_static and have the long axis along the x axis and have it behave like a footlocker lid.

Link to comment
Share on other sites

Baal, that matrix corresponds to a rotation of ~75 degrees. General form of the rotation matrix for a rotation around the x-axis is:

1    0       0
0 cos(r) -sin(r)
0 sin(r)  cos(r)

where r is the angle of rotation.

Edited by 161803398874989

You can call me Phi, Numbers, Digits, Ratio, 16, 1618, or whatever really, as long as it's not Phil.

Link to comment
Share on other sites

You could just make something like a haunted house to join the fun. Doesn't have to be a full blown FM, in my interpretation of the thing.

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

Yep, quick and simple. 5 prefab cottages surrounded by some SEED trees and a few haunts patrolling,

or a small 5 room crypt. Obviously this is a super short term project and simplicity is the key.

Please visit TDM's IndieDB site and help promote the mod:

 

http://www.indiedb.com/mods/the-dark-mod

 

(Yeah, shameless promotion... but traffic is traffic folks...)

Link to comment
Share on other sites

I'm sure I could. It's just that I had planned for the last half of October to be DR free so I could catch up on Steam games and spend the rest of the year finishing the opera house level I'm working on with Biker. I don't want to give up my planned two weeks of Steam gaming catch up. Soz!

  • Like 1

"I believe that what doesn't kill you simply makes you... stranger"

 

The Joker

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

    • taffernicus

      i am so euphoric to see new FMs keep coming out and I am keen to try it out in my leisure time, then suddenly my PC is spouting a couple of S.M.A.R.T errors...
      tbf i cannot afford myself to miss my network emulator image file&progress, important ebooks, hyper-v checkpoint & hyper-v export and the precious thief & TDM gamesaves. Don't fall yourself into & lay your hands on crappy SSD
       
      · 2 replies
    • 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.
      · 7 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
×
×
  • Create New...