Timeline for Using Unity's `transform.translate()` to translate relative to an object but only using two axis
Current License: CC BY-SA 3.0
7 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Nov 18, 2015 at 16:50 | comment | added | user3797758 | huh apparently the comment i made yesterday didn't show up.... Anyway if you want to post it post it i'm sure someone who comes across this post will find it useful | |
Nov 16, 2015 at 16:33 | comment | added | DMGregory♦ | So, just to confirm: you're not interested in a solution that fixes this problem? | |
Nov 16, 2015 at 16:30 | vote | accept | user3797758 | ||
Nov 16, 2015 at 16:30 | comment | added | user3797758 | Yes but i can correct for that with the speed that i set the object to move at. The accuracy of the speed isn't that important just the direction of movement. | |
Nov 15, 2015 at 15:12 | comment | added | DMGregory♦ |
Note that this corrects for the vertical error, but not the forward error. Since part of your forward movement went into raising/lowering the object, the remaining movement along the correct forward axis will be slightly less than the expected speed amount. The result is the player will move faster when going straight left/right than when going straight forward/back (where they'll go cos(23 degrees) ~ 92% of the intended speed). The usual fix is to use your camera vectors to construct a local coordinate frame aligned with the floor, and move using that. I can show you how if you like.
|
|
Nov 15, 2015 at 14:16 | history | edited | user3797758 | CC BY-SA 3.0 |
deleted 1 character in body
|
Nov 14, 2015 at 16:39 | history | answered | user3797758 | CC BY-SA 3.0 |