04-13-2008, 05:11 PM
I've been thinking for a while about what would be a good way to mod ferries, like the ones that will be on either side of Ebbedin. I haven't done much in terms of modding (I've got it a little bit started) or general math, but here's how I see it happening so far:
Similar to how things were in Morrowind, the player will talk to a boatmaster who can offer "Travel" services to the player. Now going into the more complicated stuff, the player can choose to sleep during the ride. That means we're aiming to make it possible for the player to enjoy the sights along the way.
The main difficulty I see is the scripting to make the boat move, and the player along with it. Right now I still need to try things out, but hopefully the solution will be one that makes it so that any object on the mesh will move with the boat.
There are a few things that I've been thinking a little bit about, but haven't come up with solutions for. Maybe some of you will have some ideas? =)
I want the boat to move, obviously. However, I've been having some difficulty in figuring out how I'll get it to move along a curved path. It would probably be much easier with a square root function of some sort, but that isn't available. What I was hoping for was some sort of way to calculate the boat's position on a circle using only an initial position (x and y) and a timer value. If it helps, the equation for a circle is X2 + Y2 = radius2. I think the solution would involve a number of equations, but I haven't had the time to really go over this part yet. If worse comes to worse and neither myself or anybody else is able to find a solution, the boat will move in straight lines, rotating every so often. I should probably also mention that the boat moves according to a 'state' variable in the script. I'll post a part of the script later to show what I mean.
Also, how should the boat logically move? Should there be oars? Maybe a sail? Will an NPC 'drive' the boat? Do we need new animations? What is the best way to do this?
Finally, should we add collision around the boat so that the player won't be able to jump off? Making a collision mesh to surround the boat shouldn't be too difficult. It would be enabled when the player is on the moving boat, and disabled when the boat has finished its tour. It would probably move with the boat using the MoveTo function.
Similar to how things were in Morrowind, the player will talk to a boatmaster who can offer "Travel" services to the player. Now going into the more complicated stuff, the player can choose to sleep during the ride. That means we're aiming to make it possible for the player to enjoy the sights along the way.
The main difficulty I see is the scripting to make the boat move, and the player along with it. Right now I still need to try things out, but hopefully the solution will be one that makes it so that any object on the mesh will move with the boat.
There are a few things that I've been thinking a little bit about, but haven't come up with solutions for. Maybe some of you will have some ideas? =)
I want the boat to move, obviously. However, I've been having some difficulty in figuring out how I'll get it to move along a curved path. It would probably be much easier with a square root function of some sort, but that isn't available. What I was hoping for was some sort of way to calculate the boat's position on a circle using only an initial position (x and y) and a timer value. If it helps, the equation for a circle is X2 + Y2 = radius2. I think the solution would involve a number of equations, but I haven't had the time to really go over this part yet. If worse comes to worse and neither myself or anybody else is able to find a solution, the boat will move in straight lines, rotating every so often. I should probably also mention that the boat moves according to a 'state' variable in the script. I'll post a part of the script later to show what I mean.
Also, how should the boat logically move? Should there be oars? Maybe a sail? Will an NPC 'drive' the boat? Do we need new animations? What is the best way to do this?
Finally, should we add collision around the boat so that the player won't be able to jump off? Making a collision mesh to surround the boat shouldn't be too difficult. It would be enabled when the player is on the moving boat, and disabled when the boat has finished its tour. It would probably move with the boat using the MoveTo function.