- Home /
Question by
Ego65 · Apr 13, 2015 at 10:59 PM ·
collisioncontroller360 controller
How to SetVibration OnCollisionEnter
hey hey, i'm using a XBox game pad. controlling my spaceship works well. Now i've tried to enable the rumble function when my ship gets hit by an enemy laser. Therefore i tried to initialize it in my laser script like this :
using UnityEngine;
using System.Collections;
using XInputDotNetPure;
public class Enemy_laser_projectile : MonoBehaviour {
void OnCollisionEnter(Collision collision)
{
if (collision.gameObject.tag == "Player")
{
GamePad.SetVibration(PlayerIndex.One,leftMotor);
But i only get the errormessage : No Overload for method 'SetVibration' takes '2' arguments
i dont know what i'm doing wrong and hopefully its basicly possible this way. Thought this would be an "easy way"
many thx for any help previously ! yours
Comment