News:

One Minute Game Review by The Happy Friar: https://ugetube.com/@OneMinteGameReviews
Also on Rumble: https://rumble.com/c/c-1115371

idTech 4 (aka Doom 3 tech) Discord Server! https://discord.gg/9wtCGHa

Main Menu

How to simulate a floating ship

Started by Springheel, January 28, 2016, 09:08:50 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Springheel

I'm creating a map for The Dark Mod that has the player board a ship in a harbour.  I'd like the ship to be bobbing up and down while the player is on board, but unfortunately binding the ship to a func_bobbing or func_pendulum produces erratic results (the player often sinks into the floor instead of raising with the ship).

I was wondering if anyone had other ideas how this could be simulated?   There is too much complex geometry in the harbour to just use a moving skybox.

One idea I had was to use the player head_bob settings to move the screen in an attempt to simulate the bobbing of the ship, but I don't know if that setting can be made to work when the player is standing still.

Anyone have any ideas on this front?



The Happy Friar

My first thought was a bind too.

A func_shakes (or whatever it's called in D3 engine)?  I know sounds can cause screen shaking.  Maybe a slow shake.

Maybe coating everything with a player clip would help stop the going through objects.

Maybe even not using a func_bobbing or pendulum (I had issues with those in stock D3) but binding to a func_mover that does what you want.  Then use a script to determine the bob.

solarsplace

Hi

Is your ship a single model?

To make the physics work properly so your player or other AI does not end up falling through the model when it moves and or the player jumps when its moving you need to make your ship a func_mover and bind your ship which is now a func_mover but no itself set to move to a controlling bobbing or pendulum which handles the movement ( bobbing ).

I have had sucess with this technique.

Good luck!

Cheers

Springheel

Motorsep had mentioned binding the ship model to a func_bobbing and then put a func_mover brush on top of it, which works fairly well (at least until two movables get in the way, which stops the whole thing).  I hadn't considered just making the entire ship a func_mover.  That would be a lot easier.  I'll give it a shot, thanks.


The Happy Friar

I don't know if TDM code changed this, but you could make it an md5anim/mesh & use a func_animated for the whole ship.  In stock D3 func_animated has no collision.

motorsep

Quote from: The Happy Friar on January 30, 2016, 04:14:52 PM
I don't know if TDM code changed this, but you could make it an md5anim/mesh & use a func_animated for the whole ship.  In stock D3 func_animated has no collision.

It does, but for projectiles only :( (and no decals after impact)