I am trying to learn how to write c++, but i am having problem with accessing character movement component. The charactermovementcomponent.h file is included on my MainCharacter.cpp where groundfriction is declared, but whenever i try to change the value of groundfriction on my MainCharacter.cpp it says groundfriction is not declared. What am i doing wrong?
You’ve spelled it “GroundFricition”. Have you tried “GroundFriction”?
GetCharacterMovement()->GroundFriction = 0.0f;
Including something does not mean it makes you a Magic variable you can access Get The Component first there is the Variable you looking for and not on your Character itself.
Btw. I recommand you looking for a C++ Basics Tutorial or picking up a Book to get some fundamental Basics. You will struggle and don´t do yourself a favor if don´t know a couple basics first. But don´t keep it all theory always try out what you Learn.
I spelled it both ways and i still get the same error. I have even copy and pasted GroundFriction from charactermovementcomponent.h
Thank you