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 1337GameDev · Jan 25, 2013 at 03:18 AM · followmovingexplosiondetonator

Making detonator explosions follow the gameobject

I am using the detonator framework that is free, from the assets store. I can get it to explode and such and can instantiate example explosions, but he explosions don't follow my objects.

I have a slow moving rectangle (as an example object) and i make a missile collide with it. When my missile collides with it, it creates an empty gameobject, parents it to the rectangle, adds a Detonator script to the empty gameobject, and then the missile calls Destroy() on itself.

The result is that the explosion goes off (basic one created by detonator script) and does not follow my rectangle. The explosion looks off and is stationary.

How do i get it to follow the rectangle object?

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
1
Best Answer

Answer by Loius · Jan 25, 2013 at 04:59 AM

Your particles are probably set up to 'simulate in world space'. You want local space instead, if that's the case.

Comment
Add comment · Show 3 · 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 1337GameDev · Jan 25, 2013 at 06:14 AM 0
Share

hmm. that sounds like it. how would i change this in the detonator framework?

avatar image Loius · Jan 25, 2013 at 06:16 PM 0
Share

I've only ever seen it once, but isn't it a small package? Open it up and find the particle system(s), then check the inspector for the word 'world' and change it to 'local'.

avatar image 1337GameDev · Jan 25, 2013 at 08:19 PM 0
Share

It has a public member saying to use world coordinates, but if i change it to false, then it changes back immediately to being true. I'll have to get all knitty gritty and look around in the package and modify it.

I wish there was a way, or something in the documentation for this. But oh well i guess.

avatar image
0

Answer by DayyanSisson · Jan 25, 2013 at 03:42 AM

Parent the explosion to the object to the rectangle:

 explosion.parent = rectangle;
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 1337GameDev · Jan 25, 2013 at 04:27 AM 0
Share

I already tried that. I have my hierarchy set up like this: Rectangle---- -- (child) EmptyGameObject (with detonator script)

The explosion doesn't follow the rectangle. If i look in the inspector at runtime, it shows the empty gameobject (that has the detonator script) is indeed parented to the rectangle. When the explosion is done, the empty gameobject is destroyed, as what is meant to happen.

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

Explosion Jumpscare Script ? 1 Answer

Elevator script problem (Java) 1 Answer

How to add a function to destroy this gameobject in game. 2 Answers

Smooth Camera Follow Script, Weird Movement... Please help! 1 Answer

Problems with java script. 1 Answer


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