When applied, this should scale down an object by 75%, however for some reason, in UPBGE it applies the scaling twice? Resulting in a scale-down of 5625%.
Attached is the example Blender File, open in up in UPBGE 2.5 and you will see transform matrix printed out into the console not as .75 but as .5625.
Unfortunately @BluePrintRandom in this specific instance, this appears to not be the case. This, let’s call it an ‘error’ happens if Tap is enabled or not.
My suspicion at this point, is that I have found myself a bug.
Did you test the file? I have tried whacking away at it with everything, nothing seems to help.
It’s not double execution as you can see from the code it only scales on sens.positive(key first pressed) and prints the world transform when not positive(key is released).
I don’t use upbge but it works as expected in 2.79b so this must be something introduced in upbge.
Workaround(this probably isn’t what you want but here’s this anyway):
If you only want to scale an object, use object.localScale
if sens.positive:
owner.localScale *= 0.75
else:
print(own.worldTransform) # or maybe you just need own.worldScale
Yeah setting the scale directly in this way works ok-- however the matrix transforms, in this specific case, need to be my method of applying the transformations.
This is mainly because of performance limitations.
Thanks @BluePrintRandom, I have posted the bug on GitHub.
This seems like a pretty integral feature that would benefit me and a lot of other users as well.