I always struggle to set references, and I was just wondering what the proper way to do it is…
Hey there @veevogames1! Are you just asking what the standard way to set variables? This depends often on the use case for most references.
@SupportiveEntity Well, what I’m trying to do is set a reference to my preview character (Type Actor) inside my Character Preview widget… I tried get actor of class and I’m running into a problem where I rotate my character on the server and the client is copying what the server is doing… I was thinking it was because I used get actor of class… so I was wondering how to set a reference to the actor in hopes it would stop my client from mimicking the server… Hopefully I’m making sense…
May I ask where you are calling “Get Actor of Class”? As in do you call it from begin play or a custom function?
I called get actor from class in my character preview widget on event construct @Boomer64
Is preview character replicated in anyway @veevogames1?
@Boomer64 In the preview character under class defaults I have replicates ticked under replication
It sounds like your problem is more of a replication issue than a referencing issue. If your goal is to only allow the client’s rotation locally, you would just turn off replication on the actor itself and don’t replicate any values.
However if you’re using Get Actor of Class
and getting the same character, that could also be an issue. Is there as way we could see your BPs and understand a bit more of the use case?
Yes, here is @veevogames1’s previous post: PLEASE HELP!!
@veevogames1 I would guess that with the replication you are also replicating movement which means if the preview character derives from actor and not character as you state then the server is just authoritatively controlling the rotation.
Might be wrong about that
@Boomer64 so how would I go about fixing that?
Show me all the replication flags you have active on your blueprint @veevogames1
Yes it is @veevogames1 but you appear to have replication turned off, so I’m not sure what the issue there would be
@Boomer64 ■■■■, IDK. It’s odd. It’s got to be something simple though. Just what is the question
Here’s the thing, I have to assume something is replicating because in your other post the client and server are side by side and the rotation is occurring from the server. The fact that the client cannot change the rotation suggests to me that it also is replicating movement. But nothing in the preview character is replicating, so is there anything else in the preview system that is replicating @veevogames1?
This must be a bug cuz everything is set to not replicated I checked everything… every variable etc… @Boomer64
Not sure but my Inventory component is replicated…
It doesn’t have a character movement component on it @veevogames1?