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 Cameron 2 · Jun 03, 2010 at 01:50 AM · camerarendererplanespace

Duplicate everything in a set space in all directions?

So imagine the player is a ball and the controls are only left and right, which applies torque to the ball in either direction. The player is on a plane and there is a mirror version of him on the other side of the plane that does the opposite of whatever he does.

The player can't leave the bounds of this plane because of the environment, but what I'm trying to do is basically rerender or duplicate everything within that plane a bunch of times in all directions. Once the player solves the puzzle, the camera will pan to a 90 degree angle towards all of the planes and zoom out to reveal a sort of wallpaper, which is part of the next environment.

I hope I don't sound crazy. I can think of dirty ways to do this, but I was wondering if there's anything interesting I could do to make this happen in a cleanly way?

Comment
Add comment
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

2 Replies

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

Answer by Cameron 2 · Jun 05, 2010 at 10:47 AM

Here's what I wrote.

Having a ton of objects moving that rely on the location of other objects is processor intensive, so I'm going to have a different prefab that has no moving elements farther out. For now:

Things are multiplied by 20 because that's how big the prefab is.

var prefab : Transform;

function Start () { for (var i=1;i<5;i++) { Instantiate (prefab, Vector3(i 20.0, 0, 0), Quaternion.identity); Instantiate (prefab, Vector3(-i 20.0, 0, 0), Quaternion.identity); Instantiate (prefab, Vector3(0, 0, i * 20), Quaternion.identity);

     for (var x=1;x&lt;5;x++) {
         Instantiate (prefab, Vector3(x * 20.0, 0, i * 20), Quaternion.identity);
         Instantiate (prefab, Vector3(-x * 20.0, 0, i * 20), Quaternion.identity);
     }
 }

}

Each slave of the player uses the following script. It isn't very good with the CPU, so I'm going to try to find a better way to do it.

var offset;

function Start() { var master = GameObject.Find("Player"); offset = master.transform.position - transform.position; }

function Update () { var master = GameObject.Find("Player"); transform.position = master.transform.position - offset; transform.rotation = master.transform.rotation; }

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
1

Answer by Adrian Love · Jun 03, 2010 at 06:03 AM

You have two options, pretty much render an image of the scene and apply it to a block so when you zoom out far enough the player can't tell the difference or, leave it there and replace everything with low-poly/low-res once they zoom out.

As for copying, Store all of your GameObjects in a Prefab and replicate it using scripting, would be my guess...

I'm new to unity so these ideas are pretty conceptual.

Comment
Add comment · Show 2 · 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 Cameron 2 · Jun 04, 2010 at 02:34 AM 0
Share

Thanks for the suggestions.

I think I'm going to try to have a master prefab and then a bunch of slave prefabs. The gravity and everything takes place in the master prefab, and the other ones just translate all of the objects in relation to the master.

avatar image Adrian Love · Jun 04, 2010 at 05:53 AM 0
Share

Sounds like it's crazy enough to work, let us know when you finish it, it'd be interesting to see what sorts of things you can come up with.

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

No one has followed this question yet.

Related Questions

Camera setup question 2 Answers

Create plane in cam's view frustum x units away 0 Answers

WebCamTexture zoomed in on iPad Pro 1 Answer

copying a 2d/3d plane/slab from one part of world and displaying it in another? 0 Answers

Arial camera get selected point 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