arithmetic with placeholders

Special forum to share and discuss skins for Pano2VR and Object2VR
Post Reply
prz24
Posts: 3
Joined: Fri May 16, 2025 2:04 pm

Hi everybody,
Is it possible to do some basic arithmetic operations with placeholders. I want to do something like that :
Action settings
Source: MouseClick
Action: Open Next Panorama
URL : {$(next)}
Pan/Tilt/Fov: $(ap)+$(*pc)/$(at)+$(*tc)/$(af)
pc and tc (for pan correction and tilt correction) being Custom Properties of the node
but it doesn't work
Thanks
User avatar
Hopki
Gnome
Posts: 13603
Joined: Thu Jan 10, 2008 3:16 pm
Location: Layer de la Haye, Essex UK
Contact:

Hi,
You would need to use variables to do the math, then use a variable placeholder in the Open Next Panorama action.
So, using a node changed source, you would set the value in a separate variable.
You would need to use the actions "Expert mode" so you can enter variable values as values.

Example:
User Data Custom Property
Pan Correction = variable name, pc
Skin variable = variable name, total_pc

You can then have a container that can be used to do the math.
Node Changed, Set Variable Value, total_pc = $(ap) Setting the current pan angle to the variable total_pc
Node Changed, Set Variable Value, total_pc + $(*pc) Add the user data custom property value to the variable total_pc
The variable total_pc will now be, pan angle + custom property.

The variable placeholder can now be used in the Open Next Panorama action.
$(*total_pc)/$(at)/$af)

Using the Node Changed source, this is worked out when you enter the node.
But you could stack the actions in a button.

Mouse Click, Set Variable Value, total_pc = $(ap)
Mouse Click, Set Variable Value, total_pc + $(*pc)
Mouse Click, Open Next Panorama, $(*total_pc)/$(at)/$af)

Regards,
Garden Gnome Support
If you send an e-mail to support please send a link to the forum post for reference.
support@ggnome.com
https://ggnome.com/wiki/documentation/
prz24
Posts: 3
Joined: Fri May 16, 2025 2:04 pm

Hi,
Its exactly what I needed. Thanks
Post Reply