Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 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 /
This question was closed Jan 02, 2018 at 04:12 AM by Sizoo8 for the following reason:

The question is answered, right answer was accepted

avatar image
0
Question by Sizoo8 · Dec 30, 2017 at 11:36 AM · physicsc #

AddExplosionForce blast direction issue in v2017.3

In the v5.5 game, I translate an object just before applying explosion force and the object moves in the expected direction (awesome). But in v2017.3, in the same scenario, the object moves in the direction based on the original position and not the translated position. I created a new test scene in v2017 for testing and I can confirm this issue.

Steps to reproduce the issue: 1) Create 3 objects (projectile, trigger, and avatar). 2) put AddExplosionForce script in avatar and position at origin (explosion position set to origin) 3) put translator script in trigger object. Place projectile and trigger anywhere convenient. 4) On the trigger object, put an event trigger (pointer on click) to first translate projectile and a second event to disable kinematic (of the projectile) and a third event to apply AddexplosionForce. 5) play camera (I am using GVR emulator editor but first person player can also be used. 6) Fire trigger event. You will see the projectile is not moving in the correct direction after translation

Comment
Add comment · Show 1
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 Sizoo8 · Dec 30, 2017 at 12:33 PM 0
Share

is$$anonymous$$enamatic is set to false just before the explosion ( rb.AddExplosionForce (power=10, explosionPos=camPos, radius=5, upwards$$anonymous$$odifier=1, force$$anonymous$$ode=Impulse);

1 Reply

  • Sort: 
avatar image
1
Best Answer

Answer by Lysander · Dec 31, 2017 at 05:37 AM

It may have to do with the script execution order, which varies between scripts and projects for no reason at all if it's set to default. You may want to play around with LateUpdate/FixedUpdate timings or add a script to the Script Execution Order list to be sure its always fired first or last to narrow down the specifics of the issue.

If needed, you can check out lordofduct's "SpacePuppy" framework on github, which implements (among many many many other things) a system to reliably do EarlyUpdates- just check out SpacepuppyBase - > GameLoopEntry to see how it works. implementing something like that yourself isn't that difficult if that's the only thing you want to pull from the framework.

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 Sizoo8 · Jan 02, 2018 at 04:10 AM 0
Share

Putting AddExplosionForce in LateUpdate solved the problem

Follow this Question

Answers Answers and Comments

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

Related Questions

2D 360 degress platformer example needed 0 Answers

How do i make my model hover 1 Answer

Why is my object tilting when moving? 2 Answers

3D Cubes vibrating and sliding while ontop of eachother 0 Answers

Problem Trying to Apply Non-Kinematic Velocity to Rigidbody 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