--- tags: - CAGE_dev_log - CAGE - rust - bevy - game_dev --- # CAGE Dev Log - Day 2 Fix curve intersection detection (本來的實作有問題) 然後實作了 Beizer Curve + offset, 會往法向量推過去。之後的道路以及碰撞都會基於這個 trait (CageCurve) 渲染。 應該就快要可以寫主要 Road System 的部分了。  ## Road System 今天思考了下,road system 還是維持 locked 以及 intent. intent 或許加入個 field 叫做 must_together, 就是這個 intent 必須一起被鎖定。 ```rust= struct PathIntent { proirity: i32, path: Vec<CageCurve>, rejected_at: Option<f32>, // [0, 1] // must be approved or rejected the whole segment must_together: bool, } ``` ## 後記 這幾天寫 code 的心態不太好,尤其寫 rust 很多時候真的很不熟悉,比較討厭。
×
Sign in
Email
Password
Forgot password
or
By clicking below, you agree to our
terms of service
.
Sign in via Facebook
Sign in via Twitter
Sign in via GitHub
Sign in via Dropbox
Sign in with Wallet
Wallet (
)
Connect another wallet
New to HackMD?
Sign up