Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by behzad.robot · Aug 23, 2012 at 11:33 AM · collisionplayerscene

Endless DeathZone??!!?

Hi How Can I Create An Endless DeathZone Which has a width but it's endless from length sth like the one seen in 2dgameplay tutorial i read those but i found nothing Helpful can some one help me about that endless Bounds maybe?!?!

Comment
Add comment · Show 9
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image fafase · Aug 23, 2012 at 11:37 AM 0
Share

Endless DeathZone, I don't get it? If endless, you will keep on falling and falling (what a game!!!) until Unity starts to go jerky on the float values. Detail a little more please.

avatar image Fattie · Aug 23, 2012 at 12:01 PM 2
Share

ENIG$$anonymous$$A OF THE DAY award.

avatar image Mander · Aug 23, 2012 at 04:58 PM 0
Share

deathception

avatar image behzad.robot · Aug 23, 2012 at 05:50 PM 0
Share

what is this deathception?!?

avatar image behzad.robot · Aug 23, 2012 at 05:53 PM 0
Share

Guys Guys I'm still willing to know about those bounds stuff!! :(

Show more comments

4 Replies

· Add your reply
  • Sort: 
avatar image
0
Best Answer

Answer by fafase · Aug 25, 2012 at 07:58 AM

Ok, as I said the box is not infinite, it is actual not possible to do something like:

 var box:BoxCollider;
 function Start(){
 box =GetComponent(BoxCollider);
 box.size.x = Mathf.Infinity;
 }

What you think is infinite is only real long, look at this:

alt text

this is taken out of the box, no change at all.


screenhunter_92 aug. 25 10.53.jpg (305.5 kB)
Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image behzad.robot · Aug 25, 2012 at 09:32 AM 0
Share

Thanks! i dindt see this!!! :( :( :( :|

avatar image
0

Answer by Kacer · Aug 23, 2012 at 11:40 AM

You could have anything that moves beyond a certain point.

pseudocode:

 if(transform.position.x >= 10){
    Destroy(gameObject);
 }

If you attach a script like this to an object it should be destroyed when it moves beyond 10x

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image
0

Answer by behzad.robot · Aug 23, 2012 at 04:36 PM

nope i already have my deathZone which Says as soon as Player EnteredYourTrigger You Destroy it but I Want it to be Endless Bound like the one in the 2d gameplay tut!

Comment
Add comment · Show 4 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Kacer · Aug 23, 2012 at 04:45 PM 0
Share

please dont add comments as new answers, use the "add comment" ins$$anonymous$$d.

Also, have you tried the answer i posted, it does not rely on triggers.

avatar image behzad.robot · Aug 23, 2012 at 05:43 PM 0
Share

yap i have and it works but i was trying to learn Bounds stuff i'm really interested in it i can also $$anonymous$$ake $$anonymous$$y Own Trigger Really Big Too but i wanted to learn How To create such a bound!

avatar image Mander · Aug 23, 2012 at 05:46 PM 0
Share

don't break ur head with unecesary stuff go the simplest way :D

avatar image behzad.robot · Aug 23, 2012 at 05:49 PM 0
Share

Yap ok thank you for answering! :|

avatar image
0

Answer by fafase · Aug 24, 2012 at 04:04 PM

OK , the lerpz tutorial HAS a box, a box collider exactly set to IsTrigger. That is what you want. You position your box which has bounds as it is a box and add this:

 function OnTriggerEnter(other:Collider){
 if(other.gameObject.tag =="Player")other.gameObject.transform.position =Vector3(0,0,0);
 }
Comment
Add comment · Show 10 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image behzad.robot · Aug 24, 2012 at 04:09 PM 0
Share

Assets/_Scripts/DeathZone.js(5,43): BCE0053: Property 'UnityEngine.GameObject.transform' is read only. From These Line: if(other.gameObject.tag =="Player") other.gameObject.transform =Vector3(0,0,0);

Also Why will these make box collider endless?

avatar image Mander · Aug 24, 2012 at 04:13 PM 0
Share

what do u mean with endlesS? could u plz explain that cuz is confusing

avatar image behzad.robot · Aug 24, 2012 at 04:16 PM 0
Share

Yes i care about it being endless i can handle other parts by myself :)

avatar image Mander · Aug 24, 2012 at 04:19 PM 0
Share

could u xplain it then? cuz nobody seems to understand. what are u callin endless exactly

avatar image fafase · Aug 24, 2012 at 09:56 PM 0
Share

I fixed this error, i was missing position. And yes, what is the endless? Nothing in nature is endless, neither is a game.

Show more comments

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

11 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

How to load a scene on collision 2 Answers

How to play an audio one shot clip on a collision 1 Answer

How to destroy a gameobject on collision 2 Answers

How to make movement on camera on button down. 1 Answer

Scene Audio Script Error 2 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges