I picked up on this and was wondering what reason is. If its a bug or is it suppose to work like this.
Basically i have an object and i want to get location of it.
If i say in level blueprint “object” get actor location - then it returns location of that object.
However if i go into Game Blueprint or CharacterBP. I add a variable that references Object.
And i say get location it returns 0,0,0
I am assuming its because its getting location of variable referencing object and not actual object.
It is of course entirely possible to retrieve correct location of any object from any type of blueprint, provided that 1) reference is valid, and 2) object actually exists/is initialized at point in time when location is queried.
So, when you tried this in game(mode?) BP, how exactly did you go about getting object reference, and when did you query its location?
variable you created references Blueprint you assigned to it, but not any specific instances of that Blueprint. You need to find a way to get a reference to instance of Blueprint in your level before you can cast to it.
One way of doing this is to use Get All Actors Of Class node. This will find all instances of class you select. You can then use a ForEachLoop to get location of each element in resulting array. This is a good solution if you only have one instance of that class in your level. It gets a bit more complex if you have several.