weixin_39707536
2021-01-03 06:52 阅读 3

Visible Boat Collider

A month or two ago I tried to attach boat collider object to a character so he could create waves while running in shallow water but that collider is visible during movement. I understand waves rely on the visual part but is it possible to hide the collider and still be able to create dynamic waves? Or has this been solved already? Sorry for old version, it's just I can't test newer version atm.

Screenshots:

clipboarder 2019 01 09-003

I took an underwater screenshot so collider would be more visible.

clipboarder 2019 01 09

该提问来源于开源项目:crest-ocean/crest

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 复制链接分享

12条回答 默认 最新

  • weixin_39630762 weixin_39630762 2021-01-03 06:52

    The documentation covers what is needed to feed data into the different types of lod data, including the dynamic waves. I guess you need the register script assigned.

    https://github.com/huwb/crest-oceanrender/blob/master/TECHNOLOGY.md

    You'll also want to check that the water interaction script is getting the info correctly such as velocity etc.

    点赞 评论 复制链接分享
  • weixin_39707536 weixin_39707536 2021-01-03 06:52

    ...Ooooor you could also say I should just uncheck LodDataDynamicWaves from main camera's culling option, didn't see that in docs.

    Thanks for suggestions though, hugely important info too, may prevent further issues in future.

    点赞 评论 复制链接分享
  • weixin_39630762 weixin_39630762 2021-01-03 06:52

    Oh wot.. if im understanding you correctly, i think that is probably legacy data. I've completely removed the use of layers from Crest when i moved it all to command buffers. You shouldnt need any LodData* scripts anymore, the 'Register' scripts will handle everything and stop it rendering into the main camera. See the example scenes. Thats assuming you're on crest latest btw.

    点赞 评论 复制链接分享
  • weixin_39707536 weixin_39707536 2021-01-03 06:52

    Everything about the situation was explained above in the first post.

    I'll clean everything up and reinstall crest and test it again today. If the issue still persists I'll let you know.

    EDIT: I've got another two issues, but again I'll check them after reinstalling Crest, maybe those are gone too.

    点赞 评论 复制链接分享
  • weixin_39707536 weixin_39707536 2021-01-03 06:52

    Ok I made a fresh install - dynamic waves work pretty well except they stopped working for my character, giving an error:

    "NullReferenceException: Object reference not set to an instance of an object FeedVelocityToExtrude.LateUpdate () (at Assets/Crest-Examples/BoatDev/Scripts/FeedVelocityToExtrude.cs:81)"

    I've copied a WaterObjectInteractionSphere0 object into my character to have dynamic waves and that worked well before updating to current version.

    My character's movement is based on CharacterController, not rigibody velocity, could this be the reason waves stopped working? Do I have to rewrite the code to use rigidbody for movement now?

    点赞 评论 复制链接分享
  • weixin_39630762 weixin_39630762 2021-01-03 06:52

    Yes, looking at that line it wants _boat and _boat.RB. This script was never meant to be flexible or general (hence living in the examples area) and I actually always thought it would be temporary but somehow never ended up replacing it (funny that).

    My recommendation for now is to rewrite the script to do what you want - pull the vel from the char controller i guess and remove the boat stuff. In the meantime I will consider writing a more generalised version of this component - if i have a good plan that is simple and supports different types then i'll have a stab and report back. I'm quite busy on other things in the short term so I'm not sure when it will be.

    Apologies i'm not able to provide better support here - this is all a spare time hobby thing and these days I can only really fix bugs or give suggestions like the above.

    点赞 评论 复制链接分享
  • weixin_39707536 weixin_39707536 2021-01-03 06:52

    Hehe if I could make something as grand and call it a hobby... Well, at least the situation is clear for now so thanks for that at least! Will be sure to check the new updates! ;-)

    点赞 评论 复制链接分享
  • weixin_39630762 weixin_39630762 2021-01-03 06:52

    Your project looks cool btw. Really distinctive look!

    点赞 评论 复制链接分享
  • weixin_39707536 weixin_39707536 2021-01-03 06:52

    Thanks a bunch, trying something non standard from time to time! If needed for, say, some community showcase or something sometime I can prepare some more projects & stuff using Crest maybe even in a more unique/surreal way, just let me know where to post.

    点赞 评论 复制链接分享
  • weixin_39630762 weixin_39630762 2021-01-03 06:52

    Hey sorry it took me a while to get back to you. I've been meaning to showcase stuff using crest. If you're up for sharing this then would uploading footage to youtube work?

    My idea right now is to have a gallery which consists of thumbnail images which can be clicked to go the video. There is a way to pull the default thumbnail for the video to get the image which would link to your youtube where you can put any info you like etc.

    点赞 评论 复制链接分享
  • weixin_39707536 weixin_39707536 2021-01-03 06:52

    No problemo, working on the stuff now! ;-) I'll post a link(s) here once I finish, is that alright?

    点赞 评论 复制链接分享
  • weixin_39630762 weixin_39630762 2021-01-03 06:52

    Sure, thanks!

    点赞 评论 复制链接分享

相关推荐