wave-harmonic / crest

A class-leading water system implemented in Unity
MIT License
3.46k stars 476 forks source link

Boat Physics - Adding colliders and player to boat causing big issues #1102

Closed JackkFi5h closed 1 year ago

JackkFi5h commented 1 year ago

Is there an existing issue for this?

Have you checked the documentation to resolve your problem?

Current Behavior

Basically, I am using the large boat from the threeboats example provided with crest. My player is a character controller (no rigidbody just a capsule collider), when it is walking into a collider this happens...

https://i.gyazo.com/1939f40910afcab722910376380d1e28.mp4

The wall it collides with also has no rigidbody so I'm quite confused as to what's going on The wall colliders are a child of the boat so I'm guessing maybe theres some function that gets all colliders possibly? Even then i dont see how the players interaction with it would cause this to happen as both the player and wall have no rigidbody

Expected Behavior

Player's movements don't have an effect on the boats physics

Steps To Reproduce

Open threeboats scene Add "floor" and "wall" box collider to ship Add FPS controller from asset store (character controller with no rigidbody) Control the player on the ship walking into the wall Ship glitches everywhere

Unity Version

2021.3.16f

Crest Version

4.16

Render Pipeline

Built-In

Editor or Standalone

Editor (Play Mode)

Environment

- OS:
- GPU:
- Graphics API:
- Target Platform:

Anything else?

No response

daleeidd commented 1 year ago

If the boat has a rigid body and the collider is a child then it becomes part of the boat's composite collider so it is part of the boat. Having a static collider (the player) on the boat will unlikely work well.

I'll move this to discussions as unlikely a bug.