- Home /
Question by
rootools · Jan 19, 2018 at 05:31 PM ·
physicsraycastskateboard
Skateboard slope problem
Hello community!) I make a game similar to Tony Hawk Pro Skater series. I have a problem with slide boards over half-pipe. I use the following method:
1) Cast raycast from board to ground in the place where the wheels are located(magenta lines)
2) Calc average vector(blue line)
3) Move forward to per frame speed
4) Rotate board along average vector
In the result i have this(see on the "Height" field): http://www.giphy.com/gifs/3oFzmksUdAM1feGJ9K
Skateboard gradually falls over pipe.
How can i fix this? Thanks!
снимок-экрана-2018-01-19-в-211819.png
(512.1 kB)
Comment