Question by
ashokdamani · May 10, 2017 at 05:04 AM ·
unity 5touch controlscrossplatformsteering
Unity steer wheel on touch button press using CrossPlatformInputManager
I am using CrossPlatformInputManager. I know I can steer a wheel by a joystick, but I want to steer the wheel on touch a button, because by joystick user need to hold and move it left or right to steer the wheel, I want to provide user a touch button to steer left and another for steer right using CrossPlatformInputManager. so that i tried below script
var steerLeftAngle = CrossPlatformInputManager.GetAxis("Left") * steerForce;
var steerRightAngle = - CrossPlatformInputManager.GetAxis("Right") * steerForce;
and on GUI I added two jump buttons (renamed to left and right) from DualTouchControl prefab, there are event triggers and button handlers already added to these buttons. Is there anything wrong here in my approach?
Comment