Hello, I have created a character using C++. The code written is for VR. It has basic movement feature and also grab certain objects. Then I tried, using blueprint, to possess a pawn.
But for some reason it crashes. If I run the same code but instead of possessing from my VRCharacter I posses from some other pawn, then possession is successful. Why does that happen? What can be the possible reasons for it? Any suggestion would be helpful. If code is needed I can provide that too.
You are trying to use “Controller” when it might not exist, resulting in a Access Violation; in “easy” terms, a Access Violation is when the program during runtime tries to use a nullptr (a pointer with an empty value). When this happens, the program will terminate with the error you are getting.
In the future, I recommend checking to make sure any pointer you are using that may not be assigned yet or may lose an assignment. As such:
Oh wow thanks a lot. And I feel kinda stupid :P. I messed up at a very basic level. Guess that’s what you get for not programming for a while. This has been a good lesson.