UnityNinja Community
Would you like to react to this message? Create an account in a few clicks or log in to continue.

UnityNinja CommunityLog in

UnityNinja - Video Game Development Community, including Resources, Forums, Marketplace & More.


descriptionThe ground must falls after 5 seconds EmptyThe 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

descriptionThe ground must falls after 5 seconds EmptyRe: 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..

descriptionThe ground must falls after 5 seconds EmptyRe: 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

descriptionThe ground must falls after 5 seconds EmptyRe: The ground must falls after 5 seconds

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

descriptionThe ground must falls after 5 seconds EmptyRe: The ground must falls after 5 seconds

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

descriptionThe ground must falls after 5 seconds EmptyRe: 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);
}
}

descriptionThe ground must falls after 5 seconds EmptyRe: 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);
}
}

descriptionThe ground must falls after 5 seconds EmptyRe: The ground must falls after 5 seconds

more_horiz
privacy_tip Permissions in this forum:
You cannot reply to topics in this forum
power_settings_newLogin to reply