C
C#2y ago
EmoEmu_69

❔ Trouble adding force to player object

Hi I'm writing some code for a class (I'm still really new to C#), and was having trouble with applying force to my player object when pressing the spacebar. Also, my if & statement doesn't seem to be activating (which might be the source of the issue to begin with). Thanks in advance!
9 Replies
JimmahDean
JimmahDean2y ago
boostCooldown = false needs to be boostCooldown == false
EmoEmu_69
EmoEmu_69OP2y ago
ooooohhh thank you so much!
JimmahDean
JimmahDean2y ago
hopefully that makes it work 🙂
EmoEmu_69
EmoEmu_69OP2y ago
sure did, thanks again! 😄
JimmahDean
JimmahDean2y ago
👌
EmoEmu_69
EmoEmu_69OP2y ago
I do have one more issue though It seems that the force is being applied the wrong direction, shooting the player backwards I tried swapping the - to a +, but that didn't seem to work
JimmahDean
JimmahDean2y ago
i don't know enough about how unity works to help you there, sorry 😦
EmoEmu_69
EmoEmu_69OP2y ago
No problemo!
Accord
Accord2y ago
Looks like nothing has happened here. I will mark this as stale and this post will be archived until there is new activity.
Want results from more Discord servers?
Add your server