Community Forum

Scaling an object that has a trigger

Forum Overview >> Scripting

CategoryScripting
Created23.03.2017 12:36


Tim Derks (timmiej93) 23.03.2017 12:38
I've been trying to scale an object that should have a trigger, while the game is running. Unfortunately, it seems like scaling through code completely disables the trigger.
I've tried adding a trigger, and scaling the object afterwards, as well as scaling the object first, and then adding the trigger. Neither of these methods seem to result in a working trigger. When I comment the 'setScale()' method out, the trigger works perfectly fine.

Is it simply not possible to have a trigger on a scaled object, or are there some special tricks for this?

Tim

Emil Drefers (Unknown) 23.03.2017 16:41
Hi,

yes, this i snot possible.
Physical objects must not be scaled.
In the named example the trigger will be scaled, when its parent is scaled.

Cheers,
Emil

Tim Derks (timmiej93) 23.03.2017 17:36
That explains a lot, thanks. I'm assuming there is no workaround for this?

Tim

Emil Drefers (Unknown) 24.03.2017 07:09
Hi,

not really, because you can't scale physical objects.

But you could use this function
https://gdn.giants-software.com/documentation_scripting.php?version=engine&category=9&function=120
to check which objects are in the 'virtual box'.

Cheers,
Emil


Note: Log in to post. Create a new account here.