The ship swivels at the moment that the buoys attach to their nodes, and then comes to it's resting position. It keeps on dancing a bit, as the constraints seem to keep pulling at each other, but this is actually great, as it makes the ship movement very realistic and doesn't jump at all.
I never thought of different PC specs... Actually, I have only two very basic scripts, one for the fish trigger and the other for controlling the ship. This is the one controlling the ship:
Spoiler float AngleZobjectreference ControllerBuoyLeftobjectreference ControllerBuoyFrontobjectreference ControllerBuoyRightobjectreference ControllerBuoyBackEVENT OnInit() RegisterForKey(72) ;FORWARD - Num8 RegisterForKey(80) ;BRAKE - Num2 RegisterForKey(75) ;RIGHT - Num4 RegisterForKey(77) ;LEFT - Num6 RegisterForKey(200) ;UpArrow RegisterForKey(208) ;DownArrow RegisterForKey(203) ;LeftArrow RegisterForKey(205) ;RightArrow ControllerBuoyLeft = Self.PlaceAtMe(AADXControllerBuoy, 1, abForcePersist = true) ControllerBuoyFront = Self.PlaceAtMe(AADXControllerBuoy, 1, abForcePersist = true) ControllerBuoyRight = Self.PlaceAtMe(AADXControllerBuoy, 1, abForcePersist = true) ControllerBuoyBack = Self.PlaceAtMe(AADXControllerBuoy, 1, abForcePersist = true) bool ControllerBuoyAttach1 = Game.AddHavokBallAndSocketConstraint(Self, "LeftAttachNode", ControllerBuoyLeft, "Testobject1", 0.0, 0.0, 0.0) bool ControllerBuoyAttach2 = Game.AddHavokBallAndSocketConstraint(Self, "FrontAttachNode", ControllerBuoyFront, "Testobject1", 0.0, 0.0, 0.0) bool ControllerBuoyAttach3 = Game.AddHavokBallAndSocketConstraint(Self, "RightAttachNode", ControllerBuoyRight, "Testobject1", 0.0, 0.0, 0.0) bool ControllerBuoyAttach4 = Game.AddHavokBallAndSocketConstraint(Self, "BackAttachNode", ControllerBuoyBack, "Testobject1", 0.0, 0.0, 0.0)EndEVENTEvent OnKeyDown(Int KeyCode) If KeyCode == 72 ;FORWARD - Num8 AngleZ = Self.GetAngleZ() ApplyHavokImpulse(Math.Sin(GetAngleZ()), Math.Cos(GetAngleZ()), 0.0, 70) EndIf If KeyCode == 75 ;RIGHT - Num4 AngleZ = Self.GetAngleZ() + 90 ControllerBuoyBack.ApplyHavokImpulse(Math.Sin(AngleZ), Math.Cos(AngleZ), 0.0, 100) EndIf If KeyCode == 77 ;LEFT - Num6 AngleZ = Self.GetAngleZ() - 90 ControllerBuoyBack.ApplyHavokImpulse(Math.Sin(AngleZ), Math.Cos(AngleZ), 0.0, 100) EndIfEndEvent
Well, you
might get problems if you start applying impulses in a fast loop, but with the code like that there won't be an issue.
It's really simple, but I'm actually stuck at something quite stupid. In the script, the get angle function doesn't work. It gives the correct value the first time, but all following calls return the starting angle from the ship, doesn't matter which direction it's facing. I have the same with the getposition function. Not sure if it's a bug, something in my code, or if it's because it's constrained. But I just can't spot the error.
Oh
fudgeknuckles! Yeah, I'd completely forgotten about this, or I'd have given you a heads up. When you apply a havok impulse you move the graphics and collision of the object, but
not the object's position in the game-space. As far as the engine is concerned it hasn't moved at all. So two problems, one easy (sort of) to fix, the other... um.
First problem - if the boat moves more than a few cells away from its starting location then its parent cell unloads, the boat unloads, and you go for a swim. The solution is a bit quantum. As soon as you start moving the boat with physics, it splits into the 'real' visible physical boat and a virtual 'ghost' boat that stays at the original location and unloads (taking the 'real' boat with it) when its parent cell unloads. You can avoid this by using the translate command to move the 'ghost' boat so it stays in range of the 'real' boat. That's a tricky bit of code because the translate must never complete, but if you just calculate the distance between the two, divide that by 3 or 4 and make the result your translate speed, it'll always take 3 or 4 seconds to cover the distance - then just keep doing that in an OnTranslateAlmostComplete event handler.
Second problem -
where is the 'real' boat??? And I've never managed to solve this one

. See, in my flyer the player is fixed t the flying machine, so I can just use the player's location and angle. But you need the player moving about freely. I think, maybe, you might be able to fix an Invisible Race NPC to the ship and use its location, but I can't remember if even that updates properly, like the player's does.
Err... I'll think about this, do some tests, but if you can come up with a different or better solution, go for it.
I will look into the functions you say to see if I can solve the beginning issue. And about the trigger, nobody could give an answer yet on how to move them, so it might not be possible.
As soon as I have the fish issue sorted, the ship turning and accelerating correctly, and the buoys invisible, I'll post a video.
[Edit]: Oh... Another issue I have is that as soon as I get a bit far from the ship, the havoc stops working and it sinks. As soon as I aproach it again, it refloats... Any way to keep havok enabled all the time for a specific object?
Here are a couple of videos, I might post them later in the thread you mentioned:
http://www.youtube.com/watch?v=YBgFZlvCELQ&feature=youtu.be
http://www.youtube.com/watch?v=Julom_D0rMM&feature=youtu.be
http://www.youtube.com/watch?v=ubGen3-U400&feature=youtu.be
Saw them, like them

.