Here’s a question – in most cases we need to call a method to get an object to return which means most statements end with methods which have brackets. ie Instance->method()
So – why does GrabbedComponent in the statement PhysicsHandle->GrabbedComponent not use brackets? ie:
if (PhysicsHandle->GrabbedComponent)
And is there a way to tell whether or not to use the method brackets.
If you’re using Visual Studio you can click on “GrabbedComponent” and it will highlight it. Then if you right click and select “Peek Definition” you will be able to see this. If you do this then you will also notice that it’s a pointer and that it’s basically the same thing he did with " if ( HitActor ) { } "