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 lumberbunny · Jun 01, 2013 at 09:08 AM · particlesparticlesystemsimulationcubemap

Is it possible to use a simulation space besides local or global?

Is there any way to use an arbitrary transform as the simulation space for a particle system? I've got a bunch of GameObjects with a highly-mobile camera in their ancestry, and I'd like for the simulation to all take place relative to the camera. Any ideas?

Comment
Add comment · Show 2
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 robertbu · Jun 01, 2013 at 09:10 AM 0
Share

Can't you just use the transform of the camera as the parent? Note you can create a new transform at runtime which you can make a parent of your particle system.

 var trans = new GameObject().transform;
avatar image lumberbunny · Jun 01, 2013 at 09:59 AM 0
Share

The camera is the parent of the other game objects and the particle systems. The problem is that, using a local simulation space, the particles all move with the transform of the camera, but also with any motion of the particle effect's transform. Using the global simulation space does not account for motion of the camera, so it doesn't take much motion at all to just "blow" all the particles off the screen. I want the desired particle effects to all happen in screen space, as if they are part of a HUD.

$$anonymous$$y fantasy is that, ins$$anonymous$$d being limited to

 particleEmitter.useWorldSpace = true; // or false

I could do something like

 particleEmitter.simulationSpace = Camera.main.transform;

(This is totally made up, so don't go looking for it. It just seems illustrative.)

1 Reply

· Add your reply
  • Sort: 
avatar image
1

Answer by Owen-Reynolds · Jun 01, 2013 at 03:07 PM

Use a 2nd immobile "GUI particle" camera, clearFlag=none? Aimed at y= -1000 or somewhere (or set all the layers and ignoreLayers correctly.)

Anything spawning on a GUI element would use screenToWorld on the guiCam (same as normal.) Anything spawning over a world object could use worldToView on MainCam, then ViewToWorld on giuCam. Uggg, but only on spawning.

Anything tracking a world object would have to go into a list and each frame do that math (but I wouldn't think those would be "gui-particles" anyway.)

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 lumberbunny · Jun 01, 2013 at 07:34 PM 0
Share

Yikes. Okay, so is the easiest way to entangle the motion of a GUI object with the offscreen GUI particles to use a script that sets equal their local position? I would just place all of the GUI objects on a separate camera, but many of them depend on global lighting and cubemaps.

Edit: Never$$anonymous$$d. I see what you're saying about worldToView/ViewToWorld now, which works irrespective of nested parentage.

Is there a reason the particles are limited to global/local? Is this worth putting in a feature request?

avatar image Owen-Reynolds · Jun 02, 2013 at 04:49 AM 0
Share

World and Local-to-Spawner Space are really obvious things to describe and to want. Think of how much trouble it is just describing what you want here. Then. if you're Local to some other transform, you have to add a slot for what it is, then think of what to do if it's destroyed.

And, I think you can always do anything fancy using Get/Set Particles, hand-changing position.

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

15 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 avatar image avatar image avatar image avatar image

Related Questions

how to change the size of a particle 0 Answers

Optimized Coin Party using Particle System.. 0 Answers

I want to pause and clear a particle system and be able to start it again, but I am using the Sparkle Rising particle which has no Particle System? 1 Answer

How do I make instantiated particles inherit Transform movement from their parent object? 1 Answer

Shuriken particle System - change velocity by trigger 0 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