Relative Motion setup with Widget Designer Pro

Moderator: Moderator Group

Relative Motion setup with Widget Designer Pro

Postby Patrick Verhey » Tue Dec 22, 2009 5:23 pm

A relative motion can archieved by using a joystick to accelerate and slow down motion by moving the joystick in the desired direction.

To archieve relative motion for layer control you will need to setup a node system in Widget Designer Pro.

First attach a joystick to your computer, then create a new joystick input node in Widget Designer Pro.

As most joystick have a built-in spring, once you release a joystick it will position it self in its center.

Unfortunately this does not always lead to the same exact position values of the joystick.

To get around this mechanical issue a "Range Asymetric" node helps to create a gap around the center values and offers individual ranges for the left right or up and down motion of a joystick. You may also setup a specific value for the center region as default.

The node setup described here has to be applied for each axis that you want relative motion for.

In the "Range Asymetric" node we will choose the X-Axis input and define the value that a left to right will provide.
For example as the raw joystick value are from 0 to 65535 we need a value range for the left of -100 to 0 and for the right of 0 to +100.

These value will be used in another node called "Add relative" to be constantly added to the last value to create a relative output value.

This is pretty easy to build with the Widget Designer Pro. Please see all values in the attached screenshot.

best regards

You do not have the required permissions to view the files attached to this post.
Patrick Verhey
Patrick Verhey
Posts: 366
Joined: Fri Jul 11, 2008 11:49 am
Location: Cologne, Germany

Return to Tutorials

Who is online

Users browsing this forum: No registered users and 1 guest