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 /
avatar image
0
Question by Vilhien · Sep 14, 2017 at 01:46 AM · general programming

Enemies pop up 2.0 Y roughly when shot.

I have a basic project after a week where I am able to shoot zombies that when shot die, When they're close they attack, all transitions in animations look smooth however..

When I shoot them, they seem to pop up to about chest height for a frame then return to the ground like a flash or flicker. Is this being caused by my collisions from a line render? I'm miffed as to why this is occurring. I will continue to troubleshoot and see what the cause is, but was curious if anyone else has run into this before.

Comment
Add comment · Show 5
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 Vicarian · Sep 14, 2017 at 04:26 AM 0
Share

You're on the right track, I think. If you're using TriggerEnter or CollisionEnter and the zombies have RIgidbody components, you might try setting the rigidbody to be kinematic immediately when the death condition is detected. This ought to prevent the jump outright, but it might also break your animations. Give it a go, and an example of your code would certainly help for troubleshooting purposes. It may also be an issue with the death animation. Try preventing the death animation from playing and see if the zombies still jump on death?

avatar image Vilhien · Sep 14, 2017 at 05:00 AM 0
Share

I have tagged the problem down to my capsule collider being used as a hitbox on the zombies. When hit it pops them off the ground by the radius of the collider. I'm not sure as to how to get around this yet, but that seems to be what is causing the problem.

avatar image Vilhien · Sep 14, 2017 at 05:41 AM 0
Share

Well, I don't know really. Honestly there is no rigid body and the tigger still pops it up. With a rigidbody it does the same. The death animation works perfectly fine. Its every hit that's causing it. I know for certain that its the capsule collider's width causing the issue. If I blow it up to obscene proportions like 10.0 the zombie literally pops right towards me as I shoot it. Like it phases in. God I'm loving this stuff. So much fun in the past week. I'd post my code but honestly I've got about four scripts working in unisen so I wouldn't know where to begin. I know for certain that its the collider thats causing it.

avatar image hexagonius · Sep 14, 2017 at 06:28 AM 0
Share

You're talking about trigger, but the pooping can only we caused by a collider. Why not making it a trigger?

avatar image Vilhien · Sep 14, 2017 at 07:33 PM 0
Share

I have the collider as a trigger checkbox checked, not sure if thats what you mean. Again I'm pretty new. is there a trigger component specifically? And I'm pretty sure I've done it as both, still does it regardless. I'm gonna try making my script handle on a child of the object tonight, if possible.

1 Reply

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

Answer by Vilhien · Sep 14, 2017 at 11:13 PM

Ok I figured out what was causing it. I have this part of my script now commented out and it stopped the action.

hitParticles.transform.position = hitPoint;

It was not a collider after all, but a point being allocated to the collider calling a particle system to spurt blood.. I don't know why it would have popped the enemy like that.. But for now I've figured out the popping cause and I'll look into it more. Thanks guys!

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 Vilhien · Sep 14, 2017 at 11:32 PM 0
Share

Above was fixed by attaching said particle system to an empty game object housing said particle emitter.. BUYA$$anonymous$$A

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

70 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

Related Questions

Random Number generation 2 Answers

Extension of editor and custom GUI 0 Answers

Unity card game issues 0 Answers

Sprite Match Mechanic 0 Answers

Generating cars in a parking garage? 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