Interface IMapping
Helpers for mapping the controller position to certain world position by applying a log transformation
Namespace: XRC.Students.SU2023.IN03.Chen
Assembly: cs.temp.dll.dll
Syntax
public interface IMapping
Methods
ApplyMapping(Vector3, Vector3)
Map the controller position to certain world position (see Transformation for details) if you're pulling an object towards the main camera
Declaration
virtual Vector3 ApplyMapping(Vector3 initialPosition, Vector3 currentPosition)
Parameters
Type | Name | Description |
---|---|---|
Vector3 | initialPosition | The initial position of controller when Update was last called. |
Vector3 | currentPosition | The current position of the controller when Update is now called. |
Returns
Type | Description |
---|---|
Vector3 |
Transformation(Single)
Take in the controller movement amount on each axis and return the mapped value after applying a log function
Declaration
static float Transformation(float move)
Parameters
Type | Name | Description |
---|---|---|
Single | move | The controller movement amount on each axis |
Returns
Type | Description |
---|---|
Single | The movement amount after applying log transformation. |