#Dash and X Flip
1 messages Β· Page 1 of 1 (latest)
yes it works, i just removed the local.scale part and its the same bahaviour, my stuff works fine unless i somewhere reset currentCooldown.
i use print to observe the bahaviour of currentCooldown
when i start the game dash is in cooldown, so im even sure the condition is working. i just cant reset it π
Alright. If you're not too deep in anything else in the Editor, you could save your stuff and Restart Unity,
then open it again, and Edit > Preferences > External Tools > Regenerate Project Files
To make sure it's not a bug.
ok i will try this π
Flipping your player should be done by flipping the X rotation by 180 degrees.
The X axis cannot be edited directly, so one must create a new Vector3 and replace the old one.
If there is for example a Healthbar on the Player game object,
you may not want all the game objects in the hierarchy to rotate their X value. (as the Text or Bar also would be flipped)
That's when you choose localRotation or localEulerAngles instead of the one that affects the entire object hierarchy.
local only affects that specific game object
(Maybe you know this, I'm just being thorough)
People usually notice these things when rotation is involved
No makes sense, it felt wierd to hardcode the size of my object with ever turn.
is the Dash currently working as intended?
sadly not. I replaced all code in dash but the dash itself and currentCooldown = 0;
So no more LocalScale checking. Still the same issue, it runs and reset the timer on tab but no dash > if i remove the timer reset it resets the timer but does not dash. Its like the command before currentCooldown = 0; gets skipped somehow.
without the timer, can you trigger a Dash?
does the base function work, or is it flawed?
It seems to work perfectly fine without the timer, it even works with the timer (by not letting me dash when i start the game as currentCooldown is 0 > i can dash after 3 seconds).
Link me the updated code
it just makes no sense why would the line 55 make line 54 not run π
(if i remove 55) everything works fine, i can dash after 3 seconds and timer keeps running.
For testing, select a different keycode than Tab.
It may have unfortunate effects in the Editor.
Can't recall if this is my superstition or if if it's actually an issue, but it's best to be on Every Safe Side when debugging.
same behavior with "e"
(got caught up in a conversation)
no worries, im trying to change the rotation for now. Kinda feel lost on the dash :/ im not familar with unity but iv done programming and it just seems weird to skip a command just because of the following command
There could very well be a logic issue with the combination of Movement, Jump and Dash.
It's been a while since I was into this. Have you checked any of the Dash tutorials?
They should cover any unintuitive issues
seems very likely, ill give it a try π thanks for your time and advices!
You're welcome.
In this picture, you can see the formula for ForceMode.Force and .Impulse
plus the 3D-specific ones.
Since you are moving by rigidbody.velocity
those may come in handy at some point.
Have a nice day o/