This is not working some one know why i dont get any errors it just does not do enything
i wanted to modefy it so that its like a force jump plate witch wil trow you in to the air
when you trigger it but as i sad its not working and yes its marked as is trigger
My Player is controlled by a Firstperson Controller
and my rigid body on the player is set to use graphity and is kenemetic
it has to be that way other wise mt fpscontroller wil freakout
but that is also the problem
is tnare a way to add the force to the gameobject or the fpc controller?????
---------------------------------------------------------------------------------------
using UnityEngine;
using System.Collections;
public class ForcePlateAddForce1 : MonoBehaviour {
public float thrust = 100f;
void Start()
{
GameObject.FindGameObjectsWithTag("Player");
GetComponent();
}
void OnTriggerEnter(Collider col)
{
var rb = col.gameObject.GetComponent();
if (col.gameObject.tag == "Player")
rb.AddForce(transform.up`enter code here`* thrust);
}
}
![alt text][1]
[1]: /storage/temp/62187-player-controller.png
↧