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

    • Ansome

      Finally got my PC back from the shop after my SSD got corrupted a week ago and damaged my motherboard. Scary stuff, but thank goodness it happened right after two months of FM development instead of wiping all my work before I could release it. New SSD, repaired Motherboard and BIOS, and we're ready to start working on my second FM with some added version control in the cloud just to be safe!
      · 0 replies
    • Petike the Taffer  »  DeTeEff

      I've updated the articles for your FMs and your author category at the wiki. Your newer nickname (DeTeEff) now comes first, and the one in parentheses is your older nickname (Fieldmedic). Just to avoid confusing people who played your FMs years ago and remember your older nickname. I've added a wiki article for your latest FM, Who Watches the Watcher?, as part of my current updating efforts. Unless I overlooked something, you have five different FMs so far.
      · 0 replies
    • Petike the Taffer

      I've finally managed to log in to The Dark Mod Wiki. I'm back in the saddle and before the holidays start in full, I'll be adding a few new FM articles and doing other updates. Written in Stone is already done.
      · 4 replies
    • nbohr1more

      TDM 15th Anniversary Contest is now active! Please declare your participation: https://forums.thedarkmod.com/index.php?/topic/22413-the-dark-mod-15th-anniversary-contest-entry-thread/
       
      · 0 replies
    • JackFarmer

      @TheUnbeholden
      You cannot receive PMs. Could you please be so kind and check your mailbox if it is full (or maybe you switched off the function)?
      · 1 reply
×
×
  • Create New...