FragMate CommunityLog in

FragMate - Software and Game Developer Community, including Resources, Forums, Marketplace & More.

Share

descriptionThe ground must falls after 5 seconds

more_horiz
When I pass on to a ground with the Character player , the ground must falls after 5 seconds but this script created by me does not work how can I fix it?

---------------



Last edited by Radeon on Tue Nov 11, 2014 6:46 am; edited 1 time in total

descriptionRe: The ground must falls after 5 seconds

more_horiz
So is this a custom script for your terrain behaviors, and are you sure it's not your player that is falling, not the terrain itself? Because your issue is most likely a collider issue. Please explain with more detail..

descriptionRe: The ground must falls after 5 seconds

more_horiz
when I go with the player character on the ground or land ,  the land fall after 5 seconds but the player character falls immediately after 1 second

descriptionRe: The ground must falls after 5 seconds

more_horiz
...........

descriptionRe: The ground must falls after 5 seconds

more_horiz
How about this Vector3.MoveTowards(transform.position, Vector3.down, 10 * Time.delatTime); ??

descriptionRe: The ground must falls after 5 seconds

more_horiz
or you can add a rigidbody to the object so it falls down.

Code:

function OnCollisionEnter(other : Collision) {
if(other.collider.tag == "Player") {
gameObject.AddComponent(Rigidbody);
}
}

descriptionRe: The ground must falls after 5 seconds

more_horiz
Or you can add a rigidbody to the object so it falls down.

Code:

function OnCollisionEnter(other : Collision) {
if(other.collider.tag == "Player") {
yield WaitForSeconds(5.0);
gameObject.AddComponent(Rigidbody);
}
}
Permissions in this forum:
You cannot reply to topics in this forum