Solved Changing Game Object Scale

Status
Not open for further replies.

Galaxy169

Approved Modder
Original poster
Approved Modder
Apr 28, 2020
29
1,582
178
Home
So, in a game, I want to change the weapon or character model size so I can see the opponent easily.
As usual, I edited every method and hooked fields that contain scale, weight, height, size and related keyword, none of them worked.

I tried searching on the internet but didn't find anything related to changing game object scale,

So now, I think I have to get Weapon from GameObject and then use transform to change the scale, but I can't wrap my head around it on how to do it or if it's even the correct way as I am fairly new to the hooking.
Do I need to hook GameObject Component and get a pointer to Weapon class then use transform?
 
  • Like
Reactions: fast00092

Numark

Awesome Active Platinian
May 23, 2017
116
939
193
It's simple, get the transform either from the Player's Class (Depends) or from Unity's class, then you can use localScale to change the players or game objects size. You need to hook.

You also may have to add some checks to avoid scaling your teammates or something.
 
  • Like
Reactions: Sevol

Galaxy169

Approved Modder
Original poster
Approved Modder
Apr 28, 2020
29
1,582
178
Home
It's simple, get the transform either from the Player's Class (Depends) or from Unity's class, then you can use localScale to change the players or game objects size. You need to hook.

You also may have to add some checks to avoid scaling your teammates or something.
Already tried both methods, none of them worked so far.
Hooked at least a hundred methods and none of them worked, The game either crash or nothing gets changed.

Wouldn't you mind if I send you my main.cpp for checking, I just want to know if I am hooking it correctly so I can continue my hunt for the right method!
 

Numark

Awesome Active Platinian
May 23, 2017
116
939
193
Already tried both methods, none of them worked so far.
Hooked at least a hundred methods and none of them worked, The game either crash or nothing gets changed.

Wouldn't you mind if I send you my main.cpp for checking, I just want to know if I am hooking it correctly so I can continue my hunt for the right method!
ok sure
 

Galaxy169

Approved Modder
Original poster
Approved Modder
Apr 28, 2020
29
1,582
178
Home
I was hooking the wrong localScale, fixed it and now I can modify the scale of the objects.

Edit: admins, lock this thread as my problem is solved.
 
  • Like
Reactions: JokerArt
Status
Not open for further replies.