Quantcast
Channel: Questions in topic: "localeulerangles"
Viewing all articles
Browse latest Browse all 106

Maintaining direction while jumping / rotating

$
0
0
Hello, I have three Vector3s: movementVector, jumpVector, fallVector. I want to be able to jump forward and rotate my object without its direction changing. I just want to make a 180 and still head in the direction without always respecting the localEulerAngles. (My camera script changes my object's look angle to match the Camera's) - movementVector converts input to the object's local euler angles. It works fine. - jumpVector is set to movementVector at the time of jumping. This value never changes until a new jump is made. - fallVector is set the second the object isn't grounded / the jump ends. AddForce will not work (at least not with my methodology), as I have incremental Gravity and if I AddForce more than once (to update the gravity) I get thrown outside of the map. At that, I tried some things with Lerp with low success mainly because it also doesn't seem to respect the gravity. Any suggestions?

Viewing all articles
Browse latest Browse all 106

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>