Movatterモバイル変換


[0]ホーム

URL:


Skip to main content

itch.ioitch.io logo & titleitch.io logo

Browse GamesGame JamsUpload GameDeveloper LogsCommunity
Log inRegister
Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines
Yaru3D Platformer Physics »Comments
n_nexy1 year ago(2 edits)(+1)

Thank you Yal you are a gem, it worked perfectly! Yeah, I've already taken care of collision with the rotated ramp (used rectangle with rotation as you mentioned), I was just missing this final piece of the puzzle.

One thing is my frame rate takes quite a hit now when walking on ramps, is dot_product just a very expensive function? 
^Disregard - my collision code was causing a bottleneck.

Thanks again!

No problem, glad it worked out so quickly!

Dot product is a very simple operation, it's just the sum of every vector component multiplied with the same component of the other vector (so the 2D case is 2 multiplications and 1 addition), so it should be faster than e.g. doing a geometric solution with trigonometry most of the time. The only thing it really does is tell you how parallel two vectors are, but it's the best choice if you need that exact thing!

itch.io on Twitteritch.io on Facebook
AboutFAQBlogContact us
Copyright © 2025 itch corp ·Directory ·Terms ·Privacy ·Cookies

[8]ページ先頭

©2009-2025 Movatter.jp