Jump to content

In-Place Rotation with TranslateTo


niston

Recommended Posts

@niston

I've been watching your video, its awesome. My boat has a big problem, I attached a trigger to it with the hope that I could detect things that enter in the trigger as the boat is moving (OnTriggerEnter), but it is impossible to detect terrain or objects that are part of a precombine, so you need to drive it carefully in order to avoid going through or under objects or terrain, that's why I didn't published it.

 

For your mod I would use xMarkers and triggers, and create a route for the boat, that once it enters to the trigger it stops and waits for the water and door translation to end (OnTranslationComplete), then continue translating the boat to the next marker and so on.

 

@DiodeLadder

Thanks :smile: Its a pitty that I can't detect the map borders, terrain or precombines... The only solution I can think of is adding triggers to whatever obstacle, so I think that if I publish it it will work only for a given area that has those triggers placed on shores and whatever object so the boat trigger can detect them and stop translating in to this direction.

Edited by DieFeM
Link to comment
Share on other sites

 

Kind of off topic, but I suppose the SetMotionType thing would smooth out the steppy collision translation of movable water? That is the only thing annoys me about movable water at the moment.

 

Unfortunately, I don't think so. I set keyframed on my moving water planes and still get the steppy collision when swimming in it while it moves (if that's what you meant). Also, water planes have extremely funky collision with each other, or rather when intersecting with/overlapping each other. Btw, re the doors, I wrote a class (DoorController) that can be attached to MovableStatic versions of doors. There's also a GateController which coordinates two DoorControllers (for left and right halfes of the gate). It works based on normal and actuated angles, all user's go to do is call .Open() or .Close() and listen to Open/Close events. Let me know if you want to take a look at it.

 

 

@DieFem: I was think I'll just make a remote control in the form of a (self-replenishing) Aid item or something suchlike. Or a version could maybe be built directly into the boat, as an extra button, not sure yet. But maybe some sort of guidance system would be nice, regarding the problem of the boat going through/under terrain/objects etc. There is a LockController which governs operation of the entire lock and knows operating state at all times - It could send suitable events to a guidance thingy.

 

I think the supposed guidance thingy could, on activation, probably acquire the activating boat in front of either gate (by triggerbox) and translate it (or it's FloatingPlatformHelper) to some marker reference, request the lock to go into appropriate state (HighOpenLowClosed or LowOpenHighClosed) and then translate the boat further into the lock, etc. Haven't thought this out yet.

 

Anyway, here's a fun fact - All the controllers (except for the individual DoorControllers, which are built into the doors) are literally wiring boxes in the game world:

 

 

 

OfopqMl.png

 

 

 

If you scrap them, the lock won't work anymore. I could have hidden them inside the walls or attached the scripts somewhere else, but I dig the fact that they are visible and that these boxes do in fact perform some task.

Link to comment
Share on other sites

Did you tried attaching the water plane to an elevator helper? you can scale it to the desired height.

I think it works like that (from ElevatorMasterScript):

PlatformHelper.SetAnimationVariableFloat("fspeed", 0) ; the movement speed (how much time it takes to reach the other position, 0 moves it instantly)
PlatformHelper.SetAnimationVariableFloat("fvalue", 0) ; if it starts at top then 1, if starts at bottom then 0.
PlatformHelper.PlayAnimation("Play01") ; start the movement

About the remote control, what would it exactly do? would you have full control, with turns, or it would start and stop a translation guided by xMarkers? because the boat can end under the terrain or out of the playable area if you let the player make the turns, which is the main problem I have with my boat.

Edited by DieFeM
Link to comment
Share on other sites

DieFeM, I actually tried using the platformhelperfree01 to move the water when I was first working on it, but it didn't work somehow (I don't remember the exact problem I saw, as it was more than a month ago). I was trying to move some floating props along with the water plane, and the platformhelper method would have been ideal for it if it worked. :-/

 

niston, thanks for having a look at it. Too bad, I was hoping there was a way to make the collision to move in a smoother manner. :-/ About the door controller, I'm just triggering animations on the two rotatehelperfree, and left and right door sync up perfectly as far as I can tell, so I am keeping the way it is. Thanks for offering, though - It's always good to know there are different methods. :thumbsup:

Link to comment
Share on other sites

 

 

DieFeM, I actually tried using the platformhelperfree01 to move the water when I was first working on it, but it didn't work somehow (I don't remember the exact problem I saw, as it was more than a month ago). I was trying to move some floating props along with the water plane, and the platformhelper method would have been ideal for it if it worked. :-/

Hmm, now I have to try it my self. Something interesting to do for today. Hurrah! :)

Link to comment
Share on other sites

 

 

 

DieFeM, I actually tried using the platformhelperfree01 to move the water when I was first working on it, but it didn't work somehow (I don't remember the exact problem I saw, as it was more than a month ago). I was trying to move some floating props along with the water plane, and the platformhelper method would have been ideal for it if it worked. :-/

Hmm, now I have to try it my self. Something interesting to do for today. Hurrah! :smile:

 

 

LOL, let us know what you find! I think I saw the problem when my character jumped into the water, but I don't remember exactly what at this point.

Link to comment
Share on other sites

One problem I do have with the water is the irregular shape required for the water lock, due to the doors being not straight. Also, the water tiles I found are mostly square, and not oblong. Right now, I got a large square section (of which most is hidden under terrain) to fill out the locks' chamber and some two smaller square sections rotated in place at the downstream door. I'm not happy with this as it creates visual artifacts and has beforementioned weird collision, but I think the only real solution would be to make a custom water NIF which I cannot do.

 

@DieFem, first I was thinking of a simple remote to switch the lock between HighOpenLowClosed and LowOpenHighClosed. But I think something xmarker based could be done. Maybe like this: You drive with the boat up to one of the gates. There is a trigger box so the guidance system ultimately knows on which side of the lock you are. Also, on triggering, it could message the player "Guidance System Locked" or whatever. An extra button on the boat's control panel could then inform the guidance system to start the transition process from whatever side you arrive to the other side. Basically taking control of the boat and translating it along xmarkers into the lock, then triggering the switchover, and then translating out the other side, finally giving boat controls back to player. Like some sort of tractor beam.

 

Another approach could be to to send the boat's "navigation computer" script a list of navigation markers once it's within range. The navigation script could then (after player hits a button to start the process) translate the boat along those markers, into the lock. upon reaching the last marker, the lock would switch over. once switchover is completed, a new list of markers is sent to the boat and it translates along them, out of the lock. That later system could perhaps be more generic and useful in other places as well?

 

Oh yeah, of course, the system would have to switch the lock into proper position first, if you arrive at the side that's currently closed.

Link to comment
Share on other sites

Yeah, I was wondering what you are doing about the cutout which only exist for one side. In my case, I am using my own quest location for it, and the other side of the gate isn't visible while water is in higher position and in transition. I'm only doing one way trip for my quest as well, so I don't have a need for further sophistication.

 

Maybe you should ask someone to create the NIF for you, though? I hope you'll get a help on this. :smile:

Link to comment
Share on other sites

Well, It works, I can move the water plane with some debris, but the water looks almost transparent for some reason.

Could it have something to do with having water under the water plane?

Edited by DieFeM
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...