private float bombLocXEnd;
public float SetExpMaxTime;
public GameObject expRotOne;
public float maxExp;
public Transform firstHitPoint;
public bool fireOpen;
void Start () {
SetExpMaxTime = 3;
fireOpen = true;
}
void Update () {
SetExpMaxTime -= Time.deltaTime;
if (SetExpMaxTime < 0 && fireOpen == true) {
maxExp = (PlayerSetting.playerCurExpDistance);
renderer.enabled=false;
Fire();
fireOpen=false;
}
}
void Fire () {
RaycastHit hit1;
if (Physics.Raycast (expRotOne.transform.position, expRotOne.transform.forward, out hit1)) {
if(hit1.distance < maxExp && hit1.collider.tag == "Unbreakable"){
expRotOne.transform.position = Vector3.Lerp (expRotOne.transform.position, hit1.point, 2.0f);
how can I do this smooth I think it isnt smooth because it isnt in the update void what am I suppose to do ?
and I need to create box trigger between expRotOne first location and hit1 location
I’m trying to one direction explosion but if explosion hit something it should stop my expRotOne gameobject has tracer component so its looks like one direction flame or red something
but explosion not smooth, its just going hit1.point in 1 frame I need to do this like 1 or 2 seconds
then I need trigger for player health
what am I suppose to do ?
if there is wrong writing sorry I cant really talk english ![]()